by thomas.beale » Tue 17 Apr 2012 17:44
Ok, I have more information from an OMG XMI expert who has analysed the BOUML XMI. Here is what he said (I tried to upload the XMI files here, but .xmi isn't allowed).
* * * *
So, your posted UML 2.3 model cannot be imported by RSA 8. I get the following error. Exactly same with eclipse 3.6 or 3.7
Problem loading file openEHR_102_RM_DT_xmi2.3.xmi. See details for more information.
No UML elements recognized (only UML 2.1, 2.1.1, 2.1.2 and 2.2 are supported)
Thus, I could open your UML 2.1 xmi file in eclipse 3.6 and RSA 8, however UML 2.2 would be preferred.
But there is a technical error in both of these XMI files from BOUML that must be fixed by that vendor. I was able to make a quick text edit to the file so that it can be imported by both eclipse 3.6 and RSA 8. Corrected version is attached. At the bottom of the file, there is a list of DataTypes contained using the xml element "ownedMember". this is invalid, it must be "packagedElement". After that edit, the file can be opened.
The better fix would be to change the model, and hopefully avoid this export error from BOUML at the same time. Most of the EA models that I've looked at in XMI have a similar problem. EA exports valid XMI, but the UML model is not interoperable with other tools. I think that both tools and models can be fixed with a simple change to best practice. I do not have EA license, so cannot test.
If you look at the bottom of the XMI file from BOUML, you see a list of DataType definitions, e.g.
<ownedMember xmi:type="uml:DataType" xmi:id="BOUML_datatype_3" name="ANY"/>
<ownedMember xmi:type="uml:DataType" xmi:id="BOUML_datatype_34" name="Any"/>
<ownedMember xmi:type="uml:DataType" xmi:id="BOUML_datatype_26" name="Assertions"/>
<ownedMember xmi:type="uml:DataType" xmi:id="BOUML_datatype_5" name="DV_IDENTIFIER"/>
<ownedMember xmi:type="uml:DataType" xmi:id="BOUML_datatype_24" name="DV_INTERVAL<DV_DATE>"/>
I assume that BOUML (and EA) allow you to simply enter the text name of an attribute data type as part of defining a class. This looks OK in a diagram, but is an incomplete model. The data type is never defined. So, when exporting, both of these tools create new data types for these "implicit" names. If you ALWAYS define every type used in your model, including attribute types such as these, then use the defined type when creating class attributes, we should get a better model. In EA, the implied types are saved correctly in an XMI extensions element, but other tools are not expected to interpret or use these vendor-specific extensions.