Lösung für “Cross Package References” in EA 9.0

Das „Problem“ von Cross Package References ist den einen oder anderen bereits bewußt. Es handelt sich dabei um folgende Konstellation: 

Paket 1 enthält Elemente (Klasse A und B). Paket 2 enthält Klasse C. Klasse C wiederum hat Attribute, welche vom Typ A und B sind, sowie eine Operation mit Parameter und Rückgabewert von Typ A und B. Klasse C hat auch noch eine Assoziationsbeziehung zu klasse A.
Es gibt also massive referentielle Abhängigkeiten zwischen Paket 1 und Paket 2. 

Wird nun Paket 2 exportiert (XMI Export), wird der gesamte Inhalt von Paket 2 in XML serialisiert. Eventuelle Referenzen zu anderen Paketen werden als Referenz in das XML-Dokument aufgenommen. Die referenzierten Elemente selbst sind natürlich nicht im XML-Dokument enthalten, sie liegen ha „physisch“ in einem anderen Paket (Paket 1). 

Wird nun das exportierte Paket 2 in ein anderes Repository (z. B. EAP File) importiert, gehen alle Informationen, die nicht wiederhergestellt werden können verloren! Dies wird durch folgende zwei Grafiken dargestellt: 

 

Nach Export von Package 2 und Import in ein leeres EAP

  

Im EA 9.0 (ab Build 906) gibt es nun zwei Konfigurationsmöglichkeiten unter: Tools | Options | XML Specifications 

Tools | Options | XML Specification 

Durch diese Konfiguration wird beim Export ein vorhandenes XML-Dokument nicht einfach überschrieben, sondern mit dem zu exportierenden Modell verglichen! Sind im bereits vorhandenem XML-Dokument Informationen vorhanden, welche im aktuellen Modell nicht vorhanden sind, erscheint ein Dialog mit den Differenzen. 

 

Der Benutzer kann entscheiden, ob er diese Information im XMI behalten will oder ob sie überschrieben werden sollen. Durch diesen Ansatz können keine Informationen mehr verlorengehen! 

Eine weitere Konfigurationsmöglichkeit erlaubt es, auch visuelle Verluste grafisch darzustellen. Wird ein Element aus einem anderen Paket (Paket 1) in einem Diagramm eines anderen Pakets (Paket 2) verwendet, gehen diese Elemente im Diagramm verloren, wenn nur Paket 2 importiert wird. Durch sogenannte Platzhalter Elemente wird im Diagramm angezeigt, dass an einer bestimmten Position eigentlich ein Element vorhanden sein sollte, es aber beim Import verlorengegangen ist. Auch alle Beziehungen zu den Platzhalter Elementen bleiben bestehen und geben dem Betrachter wichtige Informationen. 

Veröffentlicht unter Teamarbeit
Schlagworte: , , , , , , , , , ,
2 comments on “Lösung für “Cross Package References” in EA 9.0
  1. Bernhard W. sagt:

    This solves _one_ problem but there is one more – the most annoying issue with EA. EA intends that Aggregations are modeled counterintuitively such that the connector goes from the aggregated to the composite end. But this leads to the fact that in Relationship view, the properties (Associations / aggregations) are not shown in the same direction). Therefore we modeled it the other way round.

    But now the problem: In XMI exports, EA places the connector for Aggregations such that they occur in the package of the target. This leads to the fact that imported packages are changed when placing aggregations as described above. When reimporting such a package, all these connections disappear.

    What a mess!! – we have the choice between handsome models and feasible package update.

    Sparx: Please solve this issue. At least give the user the choice, in which package the connectors shall appear.

  2. HKA sagt:

    thank you for your comment. Please could you provide us with a concrete example? please send it to the central europe support: support at sparxsystems . eu

1 Pings/Trackbacks für "Lösung für “Cross Package References” in EA 9.0"
  1. […] Missing Cross Package References Reports werden nicht mehr gemeldet, wenn das geänderte element zuvor im Projekt vorhanden war und anschließend exportiert wird. […]