| [BPMN2] Using the BPMN2 editor XML as input for ATL [message #606547] |
Mon, 26 July 2010 09:11  |
Pieter Messages: 7 Registered: July 2010 |
Junior Member |
|
|
Hi all,
I'm defnining a transformation in ATL, which uses the BPMN2 metamodel as source.
I'd like to use the output XML from the BPMN2 editor as input for the ATL transformation. This does however not work. The output XML from the editor looks like this (conforming the BPMN2 xsd schema):
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL-XMI" id="sid-Definitions">
<bpmn2:process id="sid-Process">
<bpmn2:startEvent id="sid-StartEvent">
<bpmn2:outgoing>sid-SF1</bpmn2:outgoing>
</bpmn2:startEvent>
<bpmn2:task id="sid-Task">
<bpmn2:incoming>sid-SF1</bpmn2:incoming>
<bpmn2:outgoing>sid-SF2</bpmn2:outgoing>
</bpmn2:task>
<bpmn2:endEvent id="sid-EndEvent">
<bpmn2:incoming>sid-SF2</bpmn2:incoming>
</bpmn2:endEvent>
<bpmn2:sequenceFlow id="sid-SF1" sourceRef="sid-StartEvent" targetRef="sid-Task"/>
<bpmn2:sequenceFlow id="sid-SF2" sourceRef="sid-Task" targetRef="sid-EndEvent"/>
</bpmn2:process>
</bpmn2:definitions>
This does conform to the BPMN metamodel, however, this is not excepted by ATL, because "definitions", "task", etc. ain't classes defined in the metamodel (rather they are attributes). A valid XML format accepted by ATL is the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns="platform:/resource/Cent2Decent/BPMN.ecore">
<Definitions id="Process1" xmi:id="Process1">
<rootElements xmi:type="Process" id="sid-Process" name="Process1" xmi:id="sid-Process">
<flowElements xmi:type="Task" name="Task1" id="sid-Task1" xmi:id="sid-Task"/>
<flowElements xmi:type="StartEvent" name="StartEvent" id="sid-StartEvent" xmi:id="sid-StartEvent"/>
<flowElements xmi:type="EndEvent" name="EndEvent" id="sid-EndEvent" xmi:id="sid-EndEvent"/>
<flowElements xmi:type="SequenceFlow" name="SF1" id="sid-SF1" sourceRef="sid-StartEvent" targetRef="sid-Task1" xmi:id="sid-SF1"/>
<flowElements xmi:type="SequenceFlow" name="SF2" id="sid-SF2" sourceRef="sid-Task1" targetRef="sid-EndEvent" xmi:id="sid-SF2"/>
</rootElements>
</TDefinitions>
</xmi:XMI>
Is there a way to switch between the two representations? Or is there a way to load the first XML file directly in ATL?
|
|
|