Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 340055

Summary: Exception when opening diagrams with data Input Associations
Product: [Modeling] MDT.BPMN2 Reporter: Ivar Meikas <ivar>
Component: CoreAssignee: Project Inbox <mdt-bpmn2-inbox>
Status: RESOLVED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P3 CC: ahti
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Ivar Meikas CLA 2011-03-15 12:28:00 EDT
Build Identifier: 

When opening the example http://www.omg.org/spec/BPMN/2.0/examples/ZIP/Diagram%20Interchange/Examples%20-%20DI%20-%20Lanes%20and%20Nested%20Lanes.bpmn throws an exception[1].

This happens because it tries to assign org.eclipse.bpmn2.impl.DataObjectReferenceImpl object to an array of FlowNodes.

org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Value 'org.eclipse.bpmn2.impl.DataObjectReferenceImpl@6caf4065 (id: DataObject_Document, anyAttribute: null) (name: Document)' is not legal. (platform:/resource/Dev/Examples%20-%20DI%20-%20Lanes%20and%20Nested%20Lanes.bpmn2, -1, -1)
	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:83)
	at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:191)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:180)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1494)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1282)
...
Caused by: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'org.eclipse.bpmn2.impl.DataObjectReferenceImpl@6caf4065 (id: DataObject_Document, anyAttribute: null) (name: Document)' is not legal. (platform:/resource/Dev/Examples%20-%20DI%20-%20Lanes%20and%20Nested%20Lanes.bpmn2, -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)
...
Caused by: java.lang.ArrayStoreException: org.eclipse.bpmn2.impl.DataObjectReferenceImpl
	at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.java:124)
	at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:424)
	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUnique(NotifyingListImpl.java:331)
	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:315)
	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.setValue(XMLHelperImpl.java:1179)
	at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setFeatureValue(XMLHandler.java:2658)
	... 99 more

Reproducible: Always
Comment 1 Henning Heitkoetter CLA 2011-03-16 05:19:15 EDT
As I understand it, the example file is invalid: it tries to assign a DataObjectReference to the flowNodeRef reference of Lane, which is of type FlowNode. DataObjectReference, however, is only a subtype of FlowElement, not of FlowNode, and thus not a valid element here.

<semantic:lane name="Lane 2 - 2" id="Lane_Lane2_2">
	<semantic:flowNodeRef>Task_UserTask</semantic:flowNodeRef>
	<semantic:flowNodeRef>DataObject_Document</semantic:flowNodeRef>
</semantic:lane>
...
<semantic:dataObjectReference dataObjectRef="DO1276094698063" name="Document" id="DataObject_Document"/>

I do not see how we could handle such an invalid BPMN2 document differently and would propose to close as NOT_ECLIPSE?
Comment 2 Henning Heitkoetter CLA 2011-05-04 03:46:31 EDT
Resolving as NOT_ECLIPSE as outlined above.
Comment 3 Ivar Meikas CLA 2011-05-04 04:08:15 EDT
I agree, no point making workarounds for flawed examples.