Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » BPMN DIAGRAM ECORE METAMODEL(Does anybody have the metamodel?)
BPMN DIAGRAM ECORE METAMODEL [message #689732] Tue, 28 June 2011 09:03 Go to next message
Yulia B is currently offline Yulia BFriend
Messages: 16
Registered: June 2011
Junior Member
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 #690220 is a reply to message #689732] Wed, 29 June 2011 07:56 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

did you take a look in the BPMN_DIAGRAM file? There should be written which meta model is used. Maybe the GMF Notation model?

Ralph
Re: BPMN DIAGRAM ECORE METAMODEL [message #690361 is a reply to message #690220] Wed, 29 June 2011 12:42 Go to previous messageGo to next message
Yulia B is currently offline Yulia BFriend
Messages: 16
Registered: June 2011
Junior Member
Oh.. Sorry, I can't use links until I've posted more than 5 messages. It's the fourth..

[Updated on: Wed, 29 June 2011 12:42]

Report message to a moderator

Re: BPMN DIAGRAM ECORE METAMODEL [message #690363 is a reply to message #690361] Wed, 29 June 2011 12:42 Go to previous messageGo to next message
Yulia B is currently offline Yulia BFriend
Messages: 16
Registered: June 2011
Junior Member
It's the fifth..
Re: BPMN DIAGRAM ECORE METAMODEL [message #690365 is a reply to message #690220] Wed, 29 June 2011 12:43 Go to previous messageGo to next message
Yulia B is currently offline Yulia BFriend
Messages: 16
Registered: June 2011
Junior Member
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 12:43]

Report message to a moderator

Re: BPMN DIAGRAM ECORE METAMODEL [message #690366 is a reply to message #690365] Wed, 29 June 2011 12:46 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

at first you found the right meta model. To browse meta models you should consider using the meta model explorer view provided by the QVT plugin. Your model conforms to the notation model as <children> is an reference with containment set to true and no EClass.

Ralph
Re: BPMN DIAGRAM ECORE METAMODEL [message #692468 is a reply to message #690366] Mon, 04 July 2011 13:51 Go to previous messageGo to next message
Yulia B is currently offline Yulia BFriend
Messages: 16
Registered: June 2011
Junior Member
Hi, Ralph,

Could you please explain the last sentense of the previous message? I've installed the QVT plugin and I opened the Metamodel Explorer view, but I didn't understand how it could help me.

I just need .bpmn_diagram file to conform to some metamodel, like model A:
<?xml version="1.0" encoding="ASCII"?>
<tpA:RootA xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:tpA="platform:/resource/ListMetamodelRefactoring/Metamodel/TypeA.ecore" name="la racine">
  <elms name="elm1"/>
  <elms name="elm2"/>
</tpA:RootA>


conforms to metamodel MetaA:
<?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="typeA"
    nsURI="platform:/resource/ListMetamodelRefactoring/Metamodel/TypeA.ecore" nsPrefix="tpA">
  <eClassifiers xsi:type="ecore:EClass" name="RootA">
    <eStructuralFeatures xsi:type="ecore:EReference" name="elms" upperBound="-1" eType="#//ElementA"
        containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="ElementA">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
  </eClassifiers>
</ecore:EPackage>


Thank you very much for your time!
Re: BPMN DIAGRAM ECORE METAMODEL [message #692478 is a reply to message #692468] Mon, 04 July 2011 14:11 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

the meta model explorer enables you to browse any registered meta model without the need to search it in plug-ins. This can be very helpful when working with meta models you do not know very well.

What is you precise problem when writing the transformation? You can ignore the notation model as long as you do not need to store any layout information.

Ralph
Re: BPMN DIAGRAM ECORE METAMODEL [message #695781 is a reply to message #692478] Tue, 12 July 2011 14:39 Go to previous messageGo to next message
Yulia B is currently offline Yulia BFriend
Messages: 16
Registered: June 2011
Junior Member
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/
Re: BPMN DIAGRAM ECORE METAMODEL [message #696045 is a reply to message #695781] Wed, 13 July 2011 07:14 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

I personally would not recommend to modify meta models provided by any plugin. But maybe for your use case it is the best. If you want to the code of any plugin that is running in your eclipse you can also use the eclipse import function and choose "Plugins and Fragments" to import. This way you do not need to download and search any jar files.

Ralph
Re: BPMN DIAGRAM ECORE METAMODEL [message #719059 is a reply to message #696045] Thu, 25 August 2011 23:11 Go to previous message
IvannalFriend
Messages: 3
Registered: August 2011
Junior Member
Hi all,

I'm defnining a transformation in ATL, which uses the BPMN2 metamodel as target.
how can I generate the namespace for bpmn2 in the target diagram ?

Thanks in advance!

Previous Topic:How to solve ATL references?
Next Topic:org.eclipse.m2m.internal.qvt.oml.emf.util.EmfException
Goto Forum:
  


Current Time: Fri Mar 29 01:40:47 GMT 2024

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

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

Back to the top