Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Model-to-Model Transformation » [QVTo] BPMN2 Metamodel issues
[QVTo] BPMN2 Metamodel issues [message #1840593] Tue, 20 April 2021 09:22 Go to next message
Christoph Lehr is currently offline Christoph LehrFriend
Messages: 24
Registered: June 2020
Junior Member
Hi all,

I try to transform BPMN2 Process models to UML State machines unfortunately I always get errors when I try to load the model.

I created 2 test models one with Modelio and one with BPMN2 Modeller. As Metamodel I installed the Bpmn Modeler's Metamodel and I created the following simple transformation.


modeltype UML "strict" uses uml('http://www.eclipse.org/uml2/5.0.0/UML');
modeltype BPMN "strict" uses bpmn2('http://www.omg.org/spec/BPMN/20100524/MODEL-XMI');
transformation Bpmn2Uml(in Source: BPMN, out Target: UML);
 
main() {
	Source.rootObjects()[BPMN::Definitions] -> map DocumentRootToModel();
}

mapping BPMN::Definitions::DocumentRootToModel(): UML::Model {
 	result.name := "Test BPMN-UML";
 	log("Name of the Model: " + result.name);
}


In the debug/run configurations when I click on validate models I get the following message:
Quote:

Invalid source URI <model path> for parameter 'Source'


When executing my transformation I get additionally the following error:
Quote:

Failed to load model extent uri=platform:/resource/at.ac.tuwien.auto.fmchain.transformation.qvto/tests/minimal_process_bpmnmodeller.bpmn
Class 'definitions' is not found or is abstract. (platform:/resource/at.ac.tuwien.auto.fmchain.transformation.qvto/tests/minimal_process_bpmnmodeller.bpmn, 3, 548)


My thought was that BPMN Modelers Metamodel should be able to load files exported by the BPMN Modeler. What irritates me is that the Metamodel's namespace referencing XMI, but the exported Model does not.

I'm currently a little bit lost here. Does anybody have an idea what the error could be.
I added my BPMN models to the attachments

Thanks in advance for your help.
BR Christoph
Re: [QVTo] BPMN2 Metamodel issues [message #1840597 is a reply to message #1840593] Tue, 20 April 2021 10:54 Go to previous messageGo to next message
Christoph Lehr is currently offline Christoph LehrFriend
Messages: 24
Registered: June 2020
Junior Member
I tried creating my own ecore metamodel to troubleshoot, but I get the same errors as with the BPMN Modelr's.

I used it to generate the editor and ran it as a Eclipse Plugin, it looks like the definitions entry is not expected as a document root. Shall it be a document root?

If yes is the xsd schema wrong or does the xsd to genmodel/ecore function interpret the file wrongly?

I added the xsd and ecore files as zip
Re: [QVTo] BPMN2 Metamodel issues [message #1840610 is a reply to message #1840597] Tue, 20 April 2021 16:29 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7665
Registered: July 2009
Senior Member
Hi

Please provide a complete project ZIP so that we can see what declarations you have actually provided for your transformation.

Regards

Ed Willink
Re: [QVTo] BPMN2 Metamodel issues [message #1840635 is a reply to message #1840610] Wed, 21 April 2021 07:07 Go to previous messageGo to next message
Christoph Lehr is currently offline Christoph LehrFriend
Messages: 24
Registered: June 2020
Junior Member
Hi Ed Willink,

I created a reduced project with all my QVTo and Metamodel related files.

BR Christoph
  • Attachment: bpmn2uml.zip
    (Size: 35.92KB, Downloaded 83 times)
Re: [QVTo] BPMN2 Metamodel issues [message #1840659 is a reply to message #1840635] Wed, 21 April 2021 14:11 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7665
Registered: July 2009
Senior Member
Hi

Quote:
Invalid source URI <model path> for parameter 'Source'


just means that you haven't specified a credible source model.

Presumably you got past this since you ran something.

You will also see something like

Quote:
Failed to load model extent uri=platform:/resource/at.ac.tuwien.auto.fmchain.transformation.qvto/tests/minimal_process_bpmnmodeller.bpmn
Class 'definitions' is not found or is abstract. (platform:/resource/at.ac.tuwien.auto.fmchain.transformation.qvto/tests/minimal_process_bpmnmodeller.bpmn, 3, 548)


if you open your models in the Sample Ecore Editor which is always a very good arbiter between bad-writer / bad-reader.

You need to either install BPMN so that http://www.omg.org/spec/BPMN/20100524/MODEL and friends are permanently registered, or use xsi:schemaLocation so that they are locally resolvable.

Opening bpm20.ecore then creating a dynamic instance for DocumentRoot shows that the root of a useable file will look like

<?xml version="1.0" encoding="UTF-8"?>
<model:DocumentRoot xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:model="http://www.omg.org/spec/BPMN/20100524/MODEL" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL bpm20.ecore"/>


Regards

Ed Willink
Re: [QVTo] BPMN2 Metamodel issues [message #1840860 is a reply to message #1840659] Tue, 27 April 2021 07:07 Go to previous messageGo to next message
Christoph Lehr is currently offline Christoph LehrFriend
Messages: 24
Registered: June 2020
Junior Member
Hi Ed,

Thanks for the hints, unfortunately they didn't help much as the problem was rather the ecore meta model generation/QVTo interpretation of the meta model. I think the root issue is either a wrongly defined xsd schema as two xml checkers I tried said my bpmn file is invalid.

In the end I took the approach to remodel the ecore meta model that it actually displays what OMG intended the meta model looks like. If anybody has the same problem and stumbles across this thread, here are my meta model files

Nonetheless many thanks for your help.
BR Christoph
  • Attachment: ecore.zip
    (Size: 22.38KB, Downloaded 83 times)
Re: [QVTo] BPMN2 Metamodel issues [message #1840862 is a reply to message #1840860] Tue, 27 April 2021 08:26 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7665
Registered: July 2009
Senior Member
Hi

It is/was not clear to me whether you were using the tooling from https://projects.eclipse.org/projects/soa.bpmn2-modeler

If so, and your models are bad you should raise bugs against that project.

If not, then you may find that your problems are solved. All the XSD issues should have been hidden by quality Ecore metamodels.

Regards

Ed Willink
Previous Topic:[ATL] Transform only a part of the rules ?
Next Topic:UML - QVT Transformation problem
Goto Forum:
  


Current Time: Thu Jul 25 13:18:44 GMT 2024

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

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

Back to the top