Problem with BPMN2.0 Dataflow [message #892459] |
Thu, 28 June 2012 10:06  |
Omar Omana Messages: 7 Registered: June 2012 |
Junior Member |
|
|
Hi Everyone,
So, this I'm having right now a Problem when I try to parse a BPMN2.0 file that has dataflow elements associated to it.
I've tried almost everything, here I post some examples I've used:
1). This example has an association of one data input object and one dataoutput object, both data objects are defined after the task.
<task completionQuantity="1" id="sid-E52D1B8B-5CAC-4FC4-93C4-0754F601C976" isForCompensation="false" name="Task1" startQuantity="1">
<incoming>sid-E2E3A294-1852-4F7C-BD5E-0D370BA548F2</incoming>
<outgoing>sid-6D8AB201-CC1E-41BC-9BDB-03104E0214B4</outgoing>
<ioSpecification>
<dataInput id="dataInput" isCollection="false" />
<dataOutput id="dataOutput" isCollection="false" />
</ioSpecification>
<dataInputAssociation id="sid-F2D9423B-0E4B-4F48-BF2F-40B9E282F3CB">
<sourceRef>Inputobj</sourceRef>
<targetRef>dataInput</targetRef>
</dataInputAssociation>
<dataOutputAssociation id="sid-ACB1597E-1959-4EA3-8ACD-BC361C705152">
<sourceRef>dataOutput</sourceRef>
<targetRef>Outputobj</targetRef>
</dataOutputAssociation>
</task>
<dataObject id="Outputobj" isCollection="false" name="OutputTask1">
</dataObject>
<dataObject id="Inputobj" isCollection="false" name="InputTask1">
</dataObject>
I'm getting this error: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.bpmn2.impl.DataObjectImpl@77485542 (id: sid-942EA3F7-9F55-4E4A-A38A-29E226CEBC0C, anyAttribute: null) (name: OutputTask1) (isCollection: false)' is not legal. (file:/C:/Users/admin/Documents/Tesis/Projekt/Workspaces/Bpmn2Bpel/TestSeq2.xml, -1, -1)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:315)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
at bpmn2_importer.ApplicationStarter.start(ApplicationStarter.java:36)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.bpmn2.impl.DataObjectImpl@77485542 (id: sid-942EA3F7-9F55-4E4A-A38A-29E226CEBC0C, anyAttribute: null) (name: OutputTask1) (isCollection: false)' is not legal. (file:/C:/Users/admin/Documents/Tesis/Projekt/Workspaces/Bpmn2Bpel/TestSeq2.xml, -1, -1)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2663)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardReferences(XMLHandler.java:1149)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHandler.java:1228)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.java:737)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:516)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:181)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:242)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1511)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1290)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
... 15 more
Somehow the values of the DataObjects I have are wrong, but I can't figure out why, all the associations seem to be correct.
Please a little bit help there 
Thanks in advance!
|
|
|
|
|
Re: Problem with BPMN2.0 Dataflow [message #893890 is a reply to message #893500] |
Thu, 05 July 2012 20:37   |
|
OK couple of things:
1. I had to add a bunch of namespace definitions just to get this to load
2. the DataObjects should not be child elements of <lane> because DataObject extends FlowElement, and Lane.flowNodeRef must be a FlowNode
3. the first BPMNShape element in your process refers to a non-existent bpmnElement (I'm assuming it was a Lane that has been deleted at some point)
Here's the (slightly) modified process file:
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
id="Definitions_1" targetNamespace="http://sample.bpmn2.org/bpmn2/sample/process">
<bpmn2:process id="sid-AFA7F2FF-66C6-41B1-920D-2395AE9DB0F2"
isClosed="false" isExecutable="false" name="Client" processType="None">
<bpmn2:laneSet id="sid-ca96aab5-dde6-4a28-92b5-6ff8053a6d97">
<bpmn2:lane id="sid-1ED7026B-FD6D-4C95-8D74-18B29AEA1009">
<bpmn2:flowNodeRef>sid-2AC664C2-9BBA-4E7E-9968-FBFDE74D3AD7
</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>sid-5AEE3555-845C-4D6F-98E4-52BB9F9138FE
</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>sid-E52D1B8B-5CAC-4FC4-93C4-0754F601C976
</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>sid-9E30FCBA-DDDC-4395-A585-651B2960F338
</bpmn2:flowNodeRef>
<bpmn2:flowNodeRef>sid-683AA71D-6E6B-4DE9-B113-6BBE4EFAF684
</bpmn2:flowNodeRef>
</bpmn2:lane>
</bpmn2:laneSet>
<bpmn2:startEvent id="sid-2AC664C2-9BBA-4E7E-9968-FBFDE74D3AD7"
name="start">
<bpmn2:outgoing>sid-E2E3A294-1852-4F7C-BD5E-0D370BA548F2
</bpmn2:outgoing>
</bpmn2:startEvent>
<bpmn2:endEvent id="sid-5AEE3555-845C-4D6F-98E4-52BB9F9138FE"
name="end">
<bpmn2:incoming>sid-35FEBAB6-60A6-4486-88C3-79047651EC0C
</bpmn2:incoming>
</bpmn2:endEvent>
<bpmn2:task completionQuantity="1"
id="sid-E52D1B8B-5CAC-4FC4-93C4-0754F601C976" isForCompensation="false"
name="Task1" startQuantity="1">
<bpmn2:incoming>sid-E2E3A294-1852-4F7C-BD5E-0D370BA548F2
</bpmn2:incoming>
<bpmn2:outgoing>sid-6D8AB201-CC1E-41BC-9BDB-03104E0214B4
</bpmn2:outgoing>
<bpmn2:ioSpecification>
<bpmn2:dataInput id="dataInput" isCollection="false" />
<bpmn2:dataOutput id="dataOutput" isCollection="false" />
</bpmn2:ioSpecification>
<bpmn2:dataInputAssociation
id="sid-F2D9423B-0E4B-4F48-BF2F-40B9E282F3CB">
<bpmn2:sourceRef>
sid-A5A326B6-7170-41D7-A968-F183F5BDBCB5
</bpmn2:sourceRef>
<bpmn2:targetRef>
dataInput
</bpmn2:targetRef>
</bpmn2:dataInputAssociation>
<bpmn2:dataOutputAssociation
id="sid-ACB1597E-1959-4EA3-8ACD-BC361C705152">
<bpmn2:sourceRef>dataOutput</bpmn2:sourceRef>
<bpmn2:targetRef>sid-942EA3F7-9F55-4E4A-A38A-29E226CEBC0C
</bpmn2:targetRef>
</bpmn2:dataOutputAssociation>
</bpmn2:task>
<bpmn2:task completionQuantity="1"
id="sid-9E30FCBA-DDDC-4395-A585-651B2960F338" isForCompensation="false"
name="Task2" startQuantity="1">
<bpmn2:incoming>sid-6D8AB201-CC1E-41BC-9BDB-03104E0214B4
</bpmn2:incoming>
<bpmn2:outgoing>sid-105AB2A4-C091-4B23-B996-4322C2D0A2DA
</bpmn2:outgoing>
</bpmn2:task>
<bpmn2:task completionQuantity="1"
id="sid-683AA71D-6E6B-4DE9-B113-6BBE4EFAF684" isForCompensation="false"
name="Task3" startQuantity="1">
<bpmn2:incoming>sid-105AB2A4-C091-4B23-B996-4322C2D0A2DA
</bpmn2:incoming>
<bpmn2:outgoing>sid-35FEBAB6-60A6-4486-88C3-79047651EC0C
</bpmn2:outgoing>
</bpmn2:task>
<bpmn2:dataObject id="sid-942EA3F7-9F55-4E4A-A38A-29E226CEBC0C"
isCollection="false" name="OutputTask1">
</bpmn2:dataObject>
<bpmn2:dataObject id="sid-A5A326B6-7170-41D7-A968-F183F5BDBCB5"
isCollection="false" name="InputTask1">
</bpmn2:dataObject>
<bpmn2:sequenceFlow id="sid-6D8AB201-CC1E-41BC-9BDB-03104E0214B4"
name="" sourceRef="sid-E52D1B8B-5CAC-4FC4-93C4-0754F601C976"
targetRef="sid-9E30FCBA-DDDC-4395-A585-651B2960F338" />
<bpmn2:sequenceFlow id="sid-35FEBAB6-60A6-4486-88C3-79047651EC0C"
name="" sourceRef="sid-683AA71D-6E6B-4DE9-B113-6BBE4EFAF684"
targetRef="sid-5AEE3555-845C-4D6F-98E4-52BB9F9138FE" />
<bpmn2:sequenceFlow id="sid-105AB2A4-C091-4B23-B996-4322C2D0A2DA"
name="" sourceRef="sid-9E30FCBA-DDDC-4395-A585-651B2960F338"
targetRef="sid-683AA71D-6E6B-4DE9-B113-6BBE4EFAF684" />
<bpmn2:sequenceFlow id="sid-E2E3A294-1852-4F7C-BD5E-0D370BA548F2"
name="" sourceRef="sid-2AC664C2-9BBA-4E7E-9968-FBFDE74D3AD7"
targetRef="sid-E52D1B8B-5CAC-4FC4-93C4-0754F601C976" />
</bpmn2:process>
<bpmndi:BPMNDiagram id="sid-0cfa6fce-16ee-4f3f-ac2f-804b867217d6">
<bpmndi:BPMNPlane bpmnElement="sid-1c203e8f-bf0e-4e89-957b-06ee3c1f8f20"
id="sid-27bd4004-9f28-4e4b-9e2f-aa0b3c1ba476">
<bpmndi:BPMNShape bpmnElement="sid-1ED7026B-FD6D-4C95-8D74-18B29AEA1009"
id="sid-1ED7026B-FD6D-4C95-8D74-18B29AEA1009_gui" isHorizontal="true">
<dc:Bounds height="295.0" width="749.0" x="70.0" y="80.0" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-2AC664C2-9BBA-4E7E-9968-FBFDE74D3AD7"
id="sid-2AC664C2-9BBA-4E7E-9968-FBFDE74D3AD7_gui">
<dc:Bounds height="30.0" width="30.0" x="145.0" y="130.0" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-5AEE3555-845C-4D6F-98E4-52BB9F9138FE"
id="sid-5AEE3555-845C-4D6F-98E4-52BB9F9138FE_gui">
<dc:Bounds height="28.0" width="28.0" x="715.0" y="131.0" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-E52D1B8B-5CAC-4FC4-93C4-0754F601C976"
id="sid-E52D1B8B-5CAC-4FC4-93C4-0754F601C976_gui">
<dc:Bounds height="80.0" width="100.0" x="255.0" y="105.0" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-9E30FCBA-DDDC-4395-A585-651B2960F338"
id="sid-9E30FCBA-DDDC-4395-A585-651B2960F338_gui">
<dc:Bounds height="80.0" width="100.0" x="400.0" y="105.0" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-683AA71D-6E6B-4DE9-B113-6BBE4EFAF684"
id="sid-683AA71D-6E6B-4DE9-B113-6BBE4EFAF684_gui">
<dc:Bounds height="80.0" width="100.0" x="545.0" y="105.0" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-942EA3F7-9F55-4E4A-A38A-29E226CEBC0C"
id="sid-942EA3F7-9F55-4E4A-A38A-29E226CEBC0C_gui">
<dc:Bounds height="60.0" width="59.0" x="330.0" y="240.0" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-A5A326B6-7170-41D7-A968-F183F5BDBCB5"
id="sid-A5A326B6-7170-41D7-A968-F183F5BDBCB5_gui">
<dc:Bounds height="60.0" width="59.0" x="210.0" y="240.0" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sid-F2D9423B-0E4B-4F48-BF2F-40B9E282F3CB"
id="sid-F2D9423B-0E4B-4F48-BF2F-40B9E282F3CB_gui">
<di:waypoint x="254.0" y="240.0" />
<di:waypoint x="284.0" y="185.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-E2E3A294-1852-4F7C-BD5E-0D370BA548F2"
id="sid-E2E3A294-1852-4F7C-BD5E-0D370BA548F2_gui">
<di:waypoint x="175.0" y="145.0" />
<di:waypoint x="255.0" y="145.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-35FEBAB6-60A6-4486-88C3-79047651EC0C"
id="sid-35FEBAB6-60A6-4486-88C3-79047651EC0C_gui">
<di:waypoint x="645.0" y="145.0" />
<di:waypoint x="715.0" y="145.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-6D8AB201-CC1E-41BC-9BDB-03104E0214B4"
id="sid-6D8AB201-CC1E-41BC-9BDB-03104E0214B4_gui">
<di:waypoint x="355.0" y="145.0" />
<di:waypoint x="400.0" y="145.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-ACB1597E-1959-4EA3-8ACD-BC361C705152"
id="sid-ACB1597E-1959-4EA3-8ACD-BC361C705152_gui">
<di:waypoint x="322.0" y="185.0" />
<di:waypoint x="346.0" y="240.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-105AB2A4-C091-4B23-B996-4322C2D0A2DA"
id="sid-105AB2A4-C091-4B23-B996-4322C2D0A2DA_gui">
<di:waypoint x="500.0" y="145.0" />
<di:waypoint x="545.0" y="145.0" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
|
|
|
|
Re: Problem with BPMN2.0 Dataflow [message #897967 is a reply to message #897872] |
Wed, 25 July 2012 14:15   |
|
Hi Omar,
I've found the problem 
The example you posted is not valid BPMN 2.0 for the following reason: the DataInputAssociation and DataOutputAssocition both refer to their containing ServiceTask (with "targetRef" and "sourceRef", respectively). The problem is that these references must point to an ItemAwareElement according to the BPMN 2.0 spec. However, ServiceTask is NOT an ItemAwareElement (besides being the container for the DataAssociations) and therefore can't be the source or target of the DataAssociations.
Hope this helps
Bob
P.S. I'm curious: where ARE you getting these models from? They are obviously not valid BPMN 2.0 so they couldn't have been created by a compliant editor or tool... ?
|
|
|
|
Powered by
FUDForum. Page generated in 0.01522 seconds