Book a Demo

Author Topic: Including a model into another model by ref?  (Read 13995 times)

Wowbagger

  • EA User
  • **
  • Posts: 69
  • Karma: +0/-0
    • View Profile
Including a model into another model by ref?
« on: September 05, 2009, 05:08:13 am »
I have a set of projects, each of which I would like to have as a separate UML model. However, there are many common features that I want to capture into a common UML model, from which each specific project would reference needed items.

I want to be able to export each project to its own XMI file for version control, and have an XMI file for the common behavior. When I export a project, I don't want the common items in the exported file - I will export the common items into their own XMI file.

I've tried making the common model a sub-package of the specific project model, and linking that sub-package into its own XMI file, but when I export the specific project model I get all the common items exported as well, rather than either a) not doing anything or b) exporting the common model to its XMI file.


«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Including a model into another model by ref?
« Reply #1 on: September 05, 2009, 05:45:25 pm »
Perhaps you could use a Controlled Package for this. This is an old feature of EA, but often seems to work magic for new requirements.
No, you can't have it!

bioform

  • EA User
  • **
  • Posts: 230
  • Karma: +0/-0
  • Forty-Two?
    • View Profile
Re: Including a model into another model by ref?
« Reply #2 on: September 23, 2009, 08:43:07 am »
Not sure I understand how that would work?

Common Elements (Project 1) imported into Project 2 and relationships established (associations on export would have GUIDS of Project 2...)

Then when CE imported in Project 2, would there not be an issue that the associations to project 1 elements are not found on import?

My gray matter is not firing well today, help me out here!

Thanks,
David
Time is what keeps everything from happening at once, Space is what keeps it all from happening to you. <unknown>

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Including a model into another model by ref?
« Reply #3 on: September 23, 2009, 04:56:24 pm »
David,

This should actually not be a problem if you follow some sensible design guidelines.
I guess your common elements can be seen as a component on which both project 1 as project 2 are dependent on.
This should mean that the Common Elements should never have any dependencies to elements in either project1 or project2.
When exporting the Common Elements to xmi (which is what you are doing when using controlled packages) only the relations FROM Common Elements (to other common elements) are exported.
Relations TO common elements are not exported and would therefore not pose a problem.
If you do encounter relation from Common Elements to elements in project1 or project2 I think you should review the design.

Geert