Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Difference ANT script <->Run configuration
[ATL] Difference ANT script <->Run configuration [message #36503] Wed, 09 May 2007 12:45
Eclipse UserFriend
Originally posted by:

Hi everybody,

I'm currenly using ATL to transform Petri Nets to UMl Activity diagram.
the header of my transformation is :

module PN2UMLAD_V3; -- Module Template
create OUT : UML2 from IN : PetriNetMM;

I have defined a first transformation which works when I launch it with the
"Run As.." and define an appropriate configuration with the configuration
It works well and the ".uml" file I obtain looks like:

<?xml version="1.0" encoding="ISO-8859-1"?>
<uml:Model xmi:version="2.1" xmlns:xmi=""
xmi:id="_mY13kP4iEduOt9Ue4m8tuQ" name="FirstPN">
<packagedElement xmi:type="uml:Activity" xmi:id="_mY13kf4iEduOt9Ue4m8tuQ"
<node xmi:type="uml:OpaqueAction" xmi:id="_mY13kv4iEduOt9Ue4m8tuQ"
name="P2" outgoing="_mY13mP4iEduOt9Ue4m8tuQ"

.....and so on

I would like to execute the transformation from an ANT script. so I wrote
the following script (thanks to the very good ):

<project name="PN2UMLAD" default="transfo">
<!-- To Changeto use another Petri net model -->
<property name="model" value="MyFirstPetriNet"/>
<target name="loadMetaModels">
<!-- Load UML 2.0 metamodel-->
<am3.loadModel modelHandler="EMF" name="UML2MM" metamodel="MOF"
<!-- Load PN metamodel-->
<am3.loadModel modelHandler="EMF" name="PetriNetMM" metamodel="MOF"
<target name="transfo" depends="loadMetaModels">
<am3.loadModel name="sourcePNModel" metamodel="PetriNetMM"
<am3.atl path="/PN2UMLAD/Transformations/PN2UMLAD_V3.asm">
<inModel name="IN" model="sourcePNModel"/>
<inModel name="UML2" model="UML2MM"/>
<inModel name="PetriNetMM" model="PetriNetMM"/>
<outModel name="OUT" model="targetUmlModel" metamodel="UML2MM"/>
<am3.saveModel model="targetUmlModel"

This script gives me the following result :

<?xml version="1.0" encoding="ISO-8859-1"?>
<uml:Model xmi:version="2.0" xmlns:xmi=""
xmlns:uml="" name="FirstPN">
<packagedElement xsi:type="uml:Activity" name="PN_Example1">
<node xsi:type="uml:OpaqueAction" name="P2" outgoing="//PN_Example1/T2"
... and so on.

The problem is that I can't open this result with the UML tree editor.
Taking into account my weak knowledge on the subject, my questions are :

1) why are the results different (especially the xmi:version attribute and
the way the elements are referenced) ?
2) which step(s) did I miss and how to obtain the same result with an ANT

Thanks in advance for any answer and help for solving this problem and
increasing my knowledge
best regards
Previous Topic:[ATL] Model to text generation.. the case of BPEL and XSD
Next Topic:[ATL] Transformation BPEL - XPDL
Goto Forum:

Current Time: Mon Jan 18 08:50:50 GMT 2021

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

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

Back to the top