Author Topic: Managing connectors on external models (XMI import)  (Read 6860 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1359
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Managing connectors on external models (XMI import)
« on: July 23, 2021, 05:15:52 pm »
Hi,

I have a client using multiple EA projects: a common model, and a model for each team. New versions of a specific "shared package" from the common model are published via XMI files.
Each team imports the XMI in a dedicated package on its own EA project.

Elements (e.g. blocks + ports) from the imported / external package need to be associated with the local blocks. The issue is that once a new version of the common model is imported, any connector from an element (source) that belongs to the common model is deleted. I knew about this constraint however in the current context we must be able to create connectors both ways between ports. For instance an output port from a common block must have a connector from this port to the local block.

My understanding is that this issue and constraint is linked with the XMI import process, and not necessary with the EA DB. When I create a connector in the local project DB from a common to a local block, it can be seen as surprising that it is deleted from the DB as a result of the XMI import.
Unless a new option to support a way to preserve connectors is added by Sparx, the only workaround I can think of is to have a script that stores somewhere the definition of all connectors from any element in the common model so they can be restored after an XMI import.

Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


timoc

  • EA User
  • **
  • Posts: 201
  • Karma: +14/-0
    • View Profile
Re: Managing connectors on external models (XMI import)
« Reply #1 on: July 23, 2021, 06:25:02 pm »
Hi,

I have a client using multiple EA projects: a common model, and a model for each team. New versions of a specific "shared package" from the common model are published via XMI files.
Each team imports the XMI in a dedicated package on its own EA project.

Elements (e.g. blocks + ports) from the imported / external package need to be associated with the local blocks. The issue is that once a new version of the common model is imported, any connector from an element (source) that belongs to the common model is deleted. I knew about this constraint however in the current context we must be able to create connectors both ways between ports. For instance an output port from a common block must have a connector from this port to the local block.

My understanding is that this issue and constraint is linked with the XMI import process, and not necessary with the EA DB. When I create a connector in the local project DB from a common to a local block, it can be seen as surprising that it is deleted from the DB as a result of the XMI import.
Unless a new option to support a way to preserve connectors is added by Sparx, the only workaround I can think of is to have a script that stores somewhere the definition of all connectors from any element in the common model so they can be restored after an XMI import.

Maybe the merge feature will do this - if you import the file and merge with an export of a larger context containing the connectors?
https://www.sparxsystems.com/enterprise_architect_user_guide/15.2/model_publishing/merge_package_with_xmi.html

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1359
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: Managing connectors on external models (XMI import)
« Reply #2 on: July 23, 2021, 11:37:45 pm »
Thanks, I will give it a try.
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Guillaume

  • EA Practitioner
  • ***
  • Posts: 1359
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: Managing connectors on external models (XMI import)
« Reply #3 on: August 03, 2021, 08:41:42 pm »
Using the Direct Merge sorted the issue. I also tried the Comparison + Merge which works ok.

As as side note, I noticed that the Merge only accepts XMI 1.1 files i.e. if I run an export using the XMI2.1 or Native option it doesn't work when using it for the merge.
EA Merge help (https://sparxsystems.com/enterprise_architect_user_guide/15.2/model_publishing/merge_package_with_xmi.html) doesn't specify if it's limited to XMI 1.1.
Considering that it works, I guess it's fine. Perhaps supporting Merge with Native XML could improve the processing time ?
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com