BPMN DIAGRAM ECORE METAMODEL [message #689732] |
Tue, 28 June 2011 05:03  |
Eclipse User |
|
|
|
Hi all,
I need to implement an ATL transformation of a BPMN model. So I have two files as input: file.bpmn and file.bpmn_diagram, I need both of them for the transformation. I need also the metamodels of these two files correspondingly. I've found the BPMN metamodel, but can't find the BPMN_DIAGRAM metamodel. Does anybody have? Could you please share with me?
Thanks in advance!
|
|
|
|
|
|
Re: BPMN DIAGRAM ECORE METAMODEL [message #690365 is a reply to message #690220] |
Wed, 29 June 2011 08:43   |
Eclipse User |
|
|
|
Ralph, thank you very much for your reply!
Could you tell me please, if the first line (after XML declaration) in my .bpmn_diagram file is
<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:bpmn="http://stp.eclipse.org/bpmn" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_wBWLAGsqEd-yl7_INOeaMQ" type="Bpmn" name="MyBPMNDiagramFile.bpmn_diagram" measurementUnit="Pixel">
it means the metamodel of this model is GMF notation, or more concrete, "http://www.eclipse.org/gmf/runtime/1.0.2/notation" (because of the name space definition), right? I've found this metamodel (in my eclipse\plugins\org.eclipse.gmf.runtime.notation_1.5.0.v20110309-2159.jar\model\notation.ecore), but actually my model doesn't conform to it.
My file looks like:
<?xml version="1.0" encoding="UTF-8"?>
<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:bpmn="http://stp.eclipse.org/bpmn" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_wBWLAGsqEd-yl7_INOeaMQ" type="Bpmn" name="MyBPMNDiagramFile.bpmn_diagram" measurementUnit="Pixel">
<children xmi:type="notation:Node" xmi:id="_wCid0GsqEd-yl7_INOeaMQ" type="1001">
<children xmi:type="notation:Node" xmi:id="_wCid1msqEd-yl7_INOeaMQ" type="4008"/>
<children xmi:type="notation:Node" xmi:id="_wCid12sqEd-yl7_INOeaMQ" type="5001">
<children xmi:type="notation:Node" xmi:id="_R85DcmsrEd-yl7_INOeaMQ" type="2007">
<children xmi:type="notation:Node" xmi:id="_R85DeGsrEd-yl7_INOeaMQ" type="4007"/>
<styles xmi:type="notation:FontStyle" xmi:id="_R85Dc2srEd-yl7_INOeaMQ" fontName="Arial"/>
<styles xmi:type="notation:DescriptionStyle" xmi:id="_R85DdGsrEd-yl7_INOeaMQ"/>
<styles xmi:type="notation:FillStyle" xmi:id="_R85DdWsrEd-yl7_INOeaMQ" fillColor="16771304"/>
<styles xmi:type="notation:LineStyle" xmi:id="_R85DdmsrEd-yl7_INOeaMQ" lineColor="0"/>
<element xmi:type="bpmn:Lane" href="MyBPMNFile.bpmn#_R85DcWsrEd-yl7_INOeaMQ"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_R85Dd2srEd-yl7_INOeaMQ" y="5" height="200"/>
</children>
</children>
<styles xmi:type="notation:PageStyle" xmi:id="_wBWLAWsqEd-yl7_INOeaMQ"/>
<edges xmi:type="notation:Edge" xmi:id="_c4zXYmsrEd-yl7_INOeaMQ" type="3001" source="_VaLCoGsrEd-yl7_INOeaMQ" target="_XmZCkmsrEd-yl7_INOeaMQ">
<children xmi:type="notation:Node" xmi:id="_c4zXZ2srEd-yl7_INOeaMQ" type="4012">
<styles xmi:type="notation:FillStyle" xmi:id="_c4zXaGsrEd-yl7_INOeaMQ" fillColor="16776959"/>
<styles xmi:type="notation:LineStyle" xmi:id="_c4zXaWsrEd-yl7_INOeaMQ" lineColor="16776959"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_c4zXamsrEd-yl7_INOeaMQ" y="-10"/>
</children>
<styles xmi:type="notation:RoutingStyle" xmi:id="_c4zXY2srEd-yl7_INOeaMQ" routing="Rectilinear" smoothness="Normal" closestDistance="true"/>
<styles xmi:type="notation:FontStyle" xmi:id="_c4zXZGsrEd-yl7_INOeaMQ" fontName="Arial"/>
<styles xmi:type="notation:LineStyle" xmi:id="_c4zXZWsrEd-yl7_INOeaMQ" lineColor="0"/>
<element xmi:type="bpmn:SequenceEdge" href="MyBPMNFile.bpmn#_c4zXYWsrEd-yl7_INOeaMQ"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_c4zXZmsrEd-yl7_INOeaMQ" points="[20, -2, -101, -6]$[162, 14, 41, 10]"/>
</edges>
</notation:Diagram>
The notation.ecore (PFA) doesn't contain any "Children" EClass.. It seems that all file is an instance of the "Diagram" EClass of the notation.ecore, but it isn't declared. But even in this case "Diagram" EClass contains only "persistedChildren" and "transientChildren" attributes (inherited from "View" EClass), not "children". I'm totally confused..
Any thoughts will be highly appreciated! Thank you!
[Updated on: Wed, 29 June 2011 08:43] by Moderator
|
|
|
|
|
|
Re: BPMN DIAGRAM ECORE METAMODEL [message #695781 is a reply to message #692478] |
Tue, 12 July 2011 10:39   |
Eclipse User |
|
|
|
Thank you, Ralph!
I've got it.. But I had to improve the notation.ecore. I've downloaded the GMF Notation 1.5.0 from here:
http://www.eclipse.org/modeling/gmp/downloads/index.php?project=gmf-notation&showAll=1&showMax=5
I found there org.eclipse.gmf.runtime.notation_1.5.0.v20110309-2159.jar, the "model" folder inside, and notation.ecore inside. Inspite of the number "1.5.0" of GMF Notation, "nsURI="http://www.eclipse.org/gmf/runtime/1.0.2/notation" is declared in notation.ecore.
Then I opened the notation.ecore with text editor and replaced string "../../org.eclipse.emf.ecore/model/Ecore.ecore#" with "http://www.eclipse.org/emf/2002/Ecore#" (It couldn't find the Ecore model otherwise).
Then I opened the notation.ecore with Sample Ecore Model Editor and added the following references:
- I added "children", EType = "Node", Upper Bound = "-1", to EClass "View";
- "edges", EType = "Edge", Upper Bound = "-1", to EClass "Diagram".
Then a simple BPMN diagram conformed to the notation.ecore and could be processed. But if there were curved connectors in the diagram, the following error occured:
Error loading platform:/resource/TestATL/default.bpmn_diagram: org.eclipse.emf.ecore.xmi.IllegalValueException: Value '[0, 0, -119, 0]$[119, 0, 0, 0]' is not legal.
The Instance Type Name of the RelativeBendpointList is set to "java.util.List", but the presentation "[0, 0, -119, 0]$[119, 0, 0, 0]" is not the toString() presentation of ordinary Java list (it is "[0, 0, -119, 0]"). This is the cause of the error. If you change the Instance Type Name, the .bmpn_digram can be processed, but you can do nothing with connectors coordinates.
How to access coordinates is still open question for me. It's a general question of using "Instance Type Name" I try to understand here:
http://www.eclipse.org/forums/index.php/t/216440/
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05575 seconds