Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Model-to-Model Transformation » Cross-referencing UML profiles in ATL(Cross-referencing UML profiles from within Eclipse ATL)
Cross-referencing UML profiles in ATL [message #1727730] Fri, 25 March 2016 22:51 Go to next message
Kevin Mansfield is currently offline Kevin MansfieldFriend
Messages: 3
Registered: March 2016
Junior Member
Hello,

I have an issue with ATL translation in Eclipse when the UML model contains cross-references to a 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"?>
...
...
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"/>
</end>
<end xmi:id="_17_0_2_2_f5f036c_1422441878693_441124_20756">
<role xmi:type="uml:Port" href="Company_Library.profile.uml#_17_0_2_2_f5f036c_1422205317634_642500_19398"/>
</end>
</ownedConnector>
...
...

Inside my ATL script, I reference the port via the "role" attribute:
connector.end.at(dest_index).role.__xmiID__

However while running the ATL translation script within Eclipse, it is unable to reference the role defined by:
href="Company_Library.profile.uml#_17_0_2_1_68d022b_1370974096642_633421_14584"
which is a port defined inside Company_Library.profile.uml.

Questions:

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?

Any suggestions will be greatly appreciated.
Re: Cross-referencing UML profiles in ATL [message #1727766 is a reply to message #1727730] Sun, 27 March 2016 06:40 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 5625
Registered: July 2009
Senior Member
Hi

You will probably get a better response from the ATL newsgroup.

Your problem seems non-trivial so you may need to provide a repro rather
than an overview.

Regards

Ed Willink


On 26/03/2016 21:38, Kevin Mansfield wrote:
> Hello,
>
> I have an issue with ATL translation in Eclipse when the UML model
> contains cross-references to a 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"?>
> ..
> ..
> 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"/>
> </end>
> <end xmi:id="_17_0_2_2_f5f036c_1422441878693_441124_20756">
> <role xmi:type="uml:Port"
> href="Company_Library.profile.uml#_17_0_2_2_f5f036c_1422205317634_642500_19398"/>
> </end>
> </ownedConnector>
> ..
> ..
>
> Inside my ATL script, I reference the port via the "role" attribute:
> connector.end.at(dest_index).role.__xmiID__
>
> However while running the ATL translation script within Eclipse, it is
> unable to reference the role defined by:
> href="Company_Library.profile.uml#_17_0_2_1_68d022b_1370974096642_633421_14584"
> which is a port defined inside Company_Library.profile.uml.
>
> Questions:
>
> 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?
>
> Any suggestions will be greatly appreciated.
Previous Topic:When is a transformation declarative or imperative?
Next Topic:[QVTo] how to use two target sources?
Goto Forum:
  


Current Time: Mon Feb 19 20:45:31 GMT 2018

Powered by FUDForum. Page generated in 0.01421 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software