|Cross-referencing UML profiles in ATL [message #1727854]
||Mon, 28 March 2016 15:13
| Kevin Mansfield
Registered: March 2016
I have an issue with ATL translation in Eclipse when the UML model contains cross-references to a custom UML profile. I exported a UML2 model via MagicDraw export feature, and it puts the following headers in the exported model:
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Company_Library="http:///schemas/Company_Library/_mci5gB9YEeWGPsqlZErtvg/0"
Furthermore inside the UML model, I am referencing the port of a "connector" from the following piece:
<ownedConnector xmi:id="_17_0_2_2_f5f036c_1422441878678_115434_20754" name="" visibility="public">
<end xmi:id="_17_0_2_2_f5f036c_1422441878678_431675_20755" partWithPort="_17_0_2_2_f5f036c_1422441279950_334585_18801">
<role xmi:type="uml:Port" href="Company_Library.profile.uml#_17_0_2_1_68d022b_1370974096642_633421_14584"/>
<role xmi:type="uml:Port" href="Company_Library.profile.uml#_17_0_2_2_f5f036c_1422205317634_642500_19398"/>
Inside my ATL script, I reference the port via the "role" attribute:
However while running the ATL translation script within Eclipse, it is unable to reference (shows as <unknown>!<unnamed>) the role defined by:
which is a port defined inside Company_Library.profile.uml.
1. How do I modify my Ant script to allow the cross-reference to succeed? I already enabled <option name="allowInterModelReferences" value="true"/>. Do I need to explicitly load the Company_Library profile as a UML model, something like:
<atl.loadModel name="Company_Library.profile.uml" metamodel="UML2" path="<path_to_Company_Library.profile.uml">?
2. Do I need to place Company_Library.profile.uml inside a "schemas" folder since the UML2 model header specifies "Company_Library" namespace to be within the "schemas" folder?
[UPDATE] I tried both of the above options but they didn't work.
The source mode, the ATL script and the UML profile all reside in the same folder (project folder). I am able to load the UML model as a resource in the Ecore editor, and it automatically loads the profile correctly. The reference problem occurs while running the ATL script on the UML model from within Eclipse.
[UPDATE 2] I tried using the EMFTVM instead of ATL, and that seems to resolve the cross-references correctly. However I want to use ATL because of limitations of EMFTVM. So it appears there is a bug in the ATL.
Any suggestions will be greatly appreciated.
[Updated on: Wed, 30 March 2016 17:58]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02618 seconds