Skip to main content



      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 18:51 Go to next message
Eclipse UserFriend
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 02:40 Go to previous message
Eclipse UserFriend
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: Sat Jul 12 02:22:26 EDT 2025

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

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

Back to the top