Book a Demo

Author Topic: "Import package from XMI" del. relations  (Read 4889 times)

ch

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
"Import package from XMI" del. relations
« on: September 02, 2009, 11:35:10 pm »
Hello,

I have two packages. The second package consists of a model which contains a class of the first package (as a simple link). Another class of the second package has an aggregation relationship to this class. Whenever I import the first package (overwrite) via XMI file, the aggregation in the second package to the class element of the first package will be deleted (the simple link to the class still exists!).

Is there a possibility to avoid this?
« Last Edit: September 02, 2009, 11:38:03 pm by leene »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: "Import package from XMI" del. relations
« Reply #1 on: September 03, 2009, 09:29:10 pm »
That is probably because the aggregation is defined in the package you are overwriting.
The problem with EA is that I don't really know a way to figure out the parent package of a connector, or even less how to change that.
I'm guessing that the package containing the diagram where you first drew the connector might be the parent.
Something else you could try is to play with the source/target (client/supplier, whatever). You can reverse the direction of a connector, maybe that has some influence on where it is actually located.

Geert

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: "Import package from XMI" del. relations
« Reply #2 on: September 03, 2009, 10:36:59 pm »
AFAIK the connector is contained in the package containing the "client" element (the element, NOT the diagram). With generalization, this is the derived class, with an association its the "source". The source ist really a UML 1 concept and obsolete in UML 2, but EA still keeps it in the extensions section of an XMI 2.1 file.

The element FROM which you draw the connector becomes the source, and the connector will end up in its parent package. You can reverse it though, as Geert has pointed out.

ch

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: "Import package from XMI" del. relat
« Reply #3 on: September 03, 2009, 10:52:49 pm »
Thank you, that's it!
Unfortunately the direction of my connector is predetermined, so that it contains to the class from the other package. I'm watching for an alternative.

Btw, associations and generalizations belong to the sources and aggregations belong to the targets.
« Last Edit: September 03, 2009, 10:59:38 pm by leene »

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: "Import package from XMI" del. relations
« Reply #4 on: September 04, 2009, 07:40:45 pm »
I think aggregations as contained in the EA toolbox are an obsolete UML 1 concept. The UML 2 way ist to use and association and set the aggregation property on the "source" role. There have been some discussions about this in the forum.