Author Topic: Empty enumerations with an XMI 2.1 Import  (Read 5678 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1273
  • Karma: +41/-2
    • View Profile
    • www.umlchannel.com
Empty enumerations with an XMI 2.1 Import
« on: September 24, 2021, 06:15:01 pm »
Hi,

A team used the XMI v2.1 export to published class models.
When importing it into a blank EAPx file, we noticed that some enumeration classes are empty, even though literal values are visible in the XMI File.

Code: [Select]
<packagedElement xmi:type="uml:Class" xmi:id="EAID_...." name="EnumType" visibility="public">
<ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="EAID_..." name="literal value 1" visibility="public"/>

The odd thing is that some enums are populated with a similar content in the XMI.

The User Guide states the following: "When performing Enterprise Architect-to-Enterprise Architect transfers, ensure that XMI version 1.1,  XMI version 2.1 or Enterprise Architect's Native XML is selected"
Yet I recently experienced a case with the Merge where only XMI 1.1 worked. I also found the following thread:
- https://sparxsystems.com/forums/smf/index.php?topic=29218.0

Users tend to use the latest version and choose 2.1 instead of 1.1. Should we rule out 2.1 and use by default 1.1 to avoid any issue?
Is there a way to sort this issue based on the existing XMI 2.1 file ?
Guillaume

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


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12587
  • Karma: +516/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Empty enumerations with an XMI 2.1 Import
« Reply #1 on: September 24, 2021, 07:18:25 pm »
I only use XMI v1.1 for EA import/export.

Geert

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1273
  • Karma: +41/-2
    • View Profile
    • www.umlchannel.com
Re: Empty enumerations with an XMI 2.1 Import
« Reply #2 on: September 24, 2021, 07:35:35 pm »
I found out that empty enumerations are linked with "Enumeration" stereotyped classes that EA then associated with the GML profile. This could explain why something weird happens when importing the XMI.
I ran a number of tests and version 1.1 indeed works fine for the entire model.
Guillaume

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