Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » ATL- SCA empty output file (Transformation BPMN 2.0 to SCA 1.0)
ATL- SCA empty output file [message #649843] Thu, 20 January 2011 17:49 Go to next message
Alex  is currently offline Alex Friend
Messages: 9
Registered: January 2011
Junior Member
Hello,

I am new to ATL language, and I ran successfully ATL eclipse examples on eclipse.

Now, I am trying to make a M2M transformation BPMN 2.0 to SCA 1.0

I am using:

- eclipse Helios and ATL 3.1.1

- BPMN 2.0 Ecore metamodel provided by BPMN2 project
obtained from http://git.eclipse.org/c/bpmn2

- A part of SCA 1.0 Ecore metamodel generated from XSD metamodel provided by osoa.

Here my simple code ATL:

-- @path sca=/BPMN2SCA/metaModels/sca.ecore
-- @path bpmn2=/BPMN2SCA/metaModels/bpmn2.ecore

module BPMN2SCA;
create ExampleSCA : sca from ExampleBPMN : bpmn2;


rule DefinitionsToComposite {

from
col: bpmn2!Definitions

to
com: sca!Composite(

)
}


My SCA Ecore metamodel:


<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="sca">

<eClassifiers xsi:type="ecore:EClass" name="Composite">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
</ecore:EPackage>




My simple BPMN 2.0 example:

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<semantic:definitions id="_1275488606936"
targetNamespace="http://www.trisotech.com/definitions/_1275488606936"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:semantic="http://www.omg.org/spec/BPMN/20100524/MODEL">
</semantic:definitions>



I just want to make a first step, is something wrong in my ATL code ? because I get an empty output SCA file like this:

<?xml version="1.0" encoding="UTF-8"?>


Thanks a lot for your help

Alex

[Updated on: Thu, 20 January 2011 17:56]

Report message to a moderator

Re: ATL- SCA empty output file [message #649959 is a reply to message #649843] Fri, 21 January 2011 08:25 Go to previous messageGo to next message
Vincent MAHE is currently offline Vincent MAHEFriend
Messages: 129
Registered: July 2009
Senior Member
Le 20/01/2011 18:50, Alex a écrit :
> Hello,
>
> I am new to ATL language and I am trying to make a M2M transformation
> BPMN 2.0 to SCA 1.0
>
> I am using:
>
> - eclipse Helios and ATL 3.1.1
>
> - BPMN 2.0 Ecore metamodel provided by BPMN2 project obtained from
> http://git.eclipse.org/c/bpmn2
>
> - A part of SCA 1.0 Ecore metamodel generated from XSD metamodel
> provided by osoa.
>
> Here my simple code ATL:
>
> -- @path sca=/BPMN2SCA/metaModels/sca.ecore
> -- @path bpmn2=/BPMN2SCA/metaModels/bpmn2.ecore
>
> module BPMN2SCA;
> create ExampleSCA : sca from ExampleBPMN : bpmn2;
>
>
> rule DefinitionsToComposite {
>
> from
> col: bpmn2!Definitions
> to com: sca!Composite(
> )
> }
>
> My SCA Ecore metamodel:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ecore:EPackage xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="sca">
>
> <eClassifiers xsi:type="ecore:EClass" name="Composite">
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
> ordered="false" lowerBound="1"
> eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eClassifiers>
> </ecore:EPackage>
>
>
>
> My simple BPMN 2.0 example:
>
> <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
> <semantic:definitions id="_1275488606936"
> targetNamespace="http://www.trisotech.com/definitions/_1275488606936"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
> xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
> xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
> xmlns:semantic="http://www.omg.org/spec/BPMN/20100524/MODEL">
> </semantic:definitions>
>
This seems to be an empty model, so you obtain a corresponding empty SCA
model, no ??
>
> I just want to make a first step, is something wrong in my ATL code ?
> because I get an empty output SCA file like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
>
> Thanks a lot for your help
>
> Alex
>
>


--
Cordialement

Vincent MAHÉ

Ingénieur Expert - Projet IDM++ - Équipe AtlanMod
École des Mines de Nantes
La Chantrerie - 4, rue Alfred Kastler
B.P. 20722 - F-44307 NANTES Cedex 3
Tel: (33)2 51 85 81 00
Re: ATL- SCA empty output file [message #649964 is a reply to message #649959] Fri, 21 January 2011 09:01 Go to previous messageGo to next message
Alex  is currently offline Alex Friend
Messages: 9
Registered: January 2011
Junior Member
First, Thank you for your reply.

Yes it's an empty BPMN Model, but I have an ATL code which transform a Definitions to a composite.I supposed to obtain an SCA model like this

<?xml version="1.0" encoding="UTF-8"?>

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" >

</composite>


Thank you for your cooperation


Alex
Re: ATL- SCA empty output file [message #649973 is a reply to message #649964] Fri, 21 January 2011 09:13 Go to previous messageGo to next message
Vincent MAHE is currently offline Vincent MAHEFriend
Messages: 129
Registered: July 2009
Senior Member
Le 21/01/2011 10:01, Alex a écrit :
> First, Thank you for your reply.
> Yes it's an empty BPMN Model, but I have an ATL code which transform a
> Definitions to a composite.I supposed to obtain an SCA model like this
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" >
>
> </composite>
>
> Thank you for your cooperation
>
>
> Alex

ATL executes rules on "matched" elements. If you have an empty model,
ATL does nothing at all, implying you get an empty XMI file.
--
Cordialement

Vincent MAHÉ

Ingénieur Expert - Projet IDM++ - Équipe AtlanMod
École des Mines de Nantes
La Chantrerie - 4, rue Alfred Kastler
B.P. 20722 - F-44307 NANTES Cedex 3
Tel: (33)2 51 85 81 00
Re: ATL- SCA empty output file [message #649977 is a reply to message #649973] Fri, 21 January 2011 09:30 Go to previous messageGo to next message
Alex  is currently offline Alex Friend
Messages: 9
Registered: January 2011
Junior Member
I'll modify my BPMN model and I'll keep you posted.


Thanks.

Alex
Re: ATL- SCA empty output file [message #649980 is a reply to message #649973] Fri, 21 January 2011 09:48 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
Vincent MAHE wrote on Fri, 21 January 2011 04:13

ATL executes rules on "matched" elements. If you have an empty model,
ATL does nothing at all, implying you get an empty XMI file.


The xmi file isn't empty, it contains one "definitions" element.
Look carefully :
<semantic:definitions id="_1275488606936" ...></semantic:definitions>
Re: ATL- SCA empty output file [message #649988 is a reply to message #649980] Fri, 21 January 2011 10:11 Go to previous message
Alex  is currently offline Alex Friend
Messages: 9
Registered: January 2011
Junior Member
hello,


It's right, I have one element 'definitions' in my BPMN model that's why I am not supposed to obtain an empty SCA.

Normally, I must obtain an SCA model as an output file:

<?xml version="1.0" encoding="UTF-8"?>

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" >

</composite>


I posted my problem on MDT forum hoping to resolve it.

Thanks for your cooperation


Alex
Previous Topic:[ATL] Using *.profile.uml files
Next Topic:No overriding, but just changing the differences in m2m transformations
Goto Forum:
  


Current Time: Thu Apr 25 20:49:08 GMT 2024

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

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

Back to the top