Author Topic: Any way to run Fragments on different packages?  (Read 3225 times)

jplusip

  • EA User
  • **
  • Posts: 69
  • Karma: +0/-0
    • View Profile
Any way to run Fragments on different packages?
« on: July 29, 2015, 12:38:23 am »
What I would like to do:
Run a report on the Root package that goes through the entire model and generates a report, where different packages have different reports.

I guess the best way to describe it is that it would be like a Template Selector, only instead of looking at types/stereotypes, it would just look at PackageID and run a fragment on that package only.

Though now that I think about it, maybe applying different stereotypes to those packages would work. I guess I'll test that out, but if there's a better way I'm all ears!

Edit:
Stereotype idea didn't work (if anyone is wondering). The Selectors just ran the fragments on the packages and ignored the elements within them.

So... back to square one: how do I do this in the tool?
« Last Edit: July 29, 2015, 12:56:56 am by jplusip »

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Re: Any way to run Fragments on different packages
« Reply #1 on: July 29, 2015, 03:38:42 am »
Hi,

Yes you could create multiple document fragments, each with its own custom SQL that retrieves rows for packages with a specific stereotype. Although I'm not sure if you can pass #PACKAGEID# to a fragements SQL, I think you can only pass #OBJECTID# - so it may not work.

Perhaps a better solution would be to create multiple ModelDocuments, that either explicitly includes specific packages, or has a filter for a specific package stereotype. Then add the ModelDocuments to a MasterDocument.

Regards,


Jon.

jplusip

  • EA User
  • **
  • Posts: 69
  • Karma: +0/-0
    • View Profile
Re: Any way to run Fragments on different packages
« Reply #2 on: July 29, 2015, 04:41:46 am »
So,  when you talk about the ModelDocuments, are you suggesting having a different template pending on the package I want to report on, and then merging all of those generated documents into a master document?

If so, that's actually what I'm doing right now.  :) I'm just trying to see if there's a way to make things slightly more efficient to where I can just run one report off of the root package. Also, using this approach I'm having to structure the model around how I want to report on it, so I'm also trying to see whether or not that is necessary.
« Last Edit: July 29, 2015, 04:55:11 am by jplusip »