Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MDT (Model Development Tools) » empty SCA model as an output file (ATL transformation BPMN 2.0 to SCA 1.0)
empty SCA model as an output file [message #649986] Fri, 21 January 2011 05:03 Go to next message
Alex  is currently offline Alex
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"?>

I supposed to obtain this:

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

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

</composite>



There is someone who tried before to make this transformation?


Thanks a lot for your help

Alex
Re: empty SCA model as an output file [message #650587 is a reply to message #649986] Tue, 25 January 2011 11:09 Go to previous messageGo to next message
Henning Heitkoetter is currently offline Henning Heitkoetter
Messages: 21
Registered: April 2010
Junior Member
Hello,
the only thing that I can think of now without knowing ATL: you have to make sure that the BPMN2 input model is loaded by the Bpmn2ResourceImpl, otherwise it won't recognize the Definitions element in the (XML) input file.

How does ATL load the input model? Can you change the line
-- @path bpmn2=/BPMN2SCA/metaModels/bpmn2.ecore
to something which points to the BPMN2 plugin, like http://www.omg.org/spec/BPMN/20100524/MODEL (and install this plugin)?

Alternatively, you could try with an BPMN2 XMI input file (instead of plain XML).

Do you have any chance of debugging the transformation process to see if it indeed starts with an empty input model?

Regards,
Henning
Re: empty SCA model as an output file [message #650595 is a reply to message #650587] Tue, 25 January 2011 11:27 Go to previous message
Alex  is currently offline Alex
Messages: 9
Registered: January 2011
Junior Member
Thank you for your cooperation.

In fact, the problem was the BPMN Model Input - it was XML format and ATL accept just XMI format.

It works now with XMI format.


Best regards,

Alex
Previous Topic:[MDT-OCL] Defining OCL constraints
Next Topic:In memory Ecore model to XSD
Goto Forum:
  


Current Time: Tue Sep 02 12:50:25 EDT 2014

Powered by FUDForum. Page generated in 0.01585 seconds