Author Topic: Publishing patterns does not consider package hierarchy  (Read 612 times)

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Arenīt we all in the model business ?
    • View Profile
    • Karl Storz homepage
Publishing patterns does not consider package hierarchy
« on: June 06, 2017, 06:31:46 pm »
Sometimes good quick ideas turn into medium high effort ones if your enthusiasm is doing the front runner dance with reality  :)

The idea:
Create a pattern for virtual model documents to have the same documentation structure at hand over and over again.

The challenge:
To have a common header with history, etc. these have to be stored in a document artifact inside a package to be colelcted by the document generator.

What has been accomplished:
Setting up the structure of model documents (empty) to be filled with packages later on (after expanding the pattern).
Setting up a package with the document artifact containing the history.
Creation of a diagram with all elements on it including the package with the artifact plus the artifact itself separately on the diagram (it will otherwise not be saved with the pattern).

So the structure is:

model document 1 (referencing the header package below)
model document 2 (empty)
model document 3 (empty)
Header package
|
 ---Artifact with history

On the diagram all 5 objects are placed flat and the diagram is saved as a pattern.xml

After importing the pattern and applying it to a diagram the following is observable:

  • The model documents are in place including tagged values and ready to be filled for documentation. This is nice. Check.
  • The header package is present. Check.
  • The artifact is no longer inside the package. Not good.
  • The package is no longer referenced in the model document. Not good.

To conclude: Creating patterns does not consider package hierarchies as they are saved from diagrams. A package in turn does not automatically include its contents and putting the content flat in the diagram leads to having it reflected flat in the pattern.

I am not tempted to state this is a bug. Currently I felt this to be a great idea to handle a certain use case of mine to solve a specific problem and I have found my expectations are not matched.

Therefore I will not file a bug report but raise this as a note to everyone expecting recursive inclusion of items in patterns. It does not work.
I am pretty much convinced there are more important problems Sparx should take care of and I even know a few of these.

Oliver

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6216
  • Karma: +49/-5
    • View Profile
Re: Publishing patterns does not consider package hierarchy
« Reply #1 on: June 07, 2017, 08:51:52 am »
Patterns that include package structure are possible, they just existing in the model wizard instead.
http://sparxsystems.com/enterprise_architect_user_guide/13.0/modeling_tools/model_wizard.html

Here's the help for adding them to a technology.
http://sparxsystems.com/enterprise_architect_user_guide/13.0/modeling_tools/model_templates2.html

As an added bonus, you can at time of import disable creation of portions of the structure (at the package level from memory).
Simon

support@sparxsystems.com

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Arenīt we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Publishing patterns does not consider package hierarchy
« Reply #2 on: June 07, 2017, 04:48:23 pm »
Ah, thanks Simon, I did not have the model templates on my list. Great advice.

The only 2 drawbacks I see here:
  • It definitely requires an MTS file.
  • I assume that any time I would create an update to the MDG using the wizard in EA I need to manually add the section.

Anyway, looks promising I will give it a try, thanks for pointing me in that direction.

Oliver