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

Bug 355651

Summary: ItemDefinition.structureRef property not being handled correctly
Product: [SOA] BPMN2Modeler Reporter: Robert Brodt <bbrodt>
Component: UIAssignee: Robert Brodt <bbrodt>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: reiner.hille-doering
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
URL: https://issues.jboss.org/browse/JBPM-3173
Whiteboard:

Description Robert Brodt CLA 2011-08-24 06:20:32 EDT
The ItemDefinition is currently an object created as a top level element on the canvas, through the advanced properties. It is used to define the base level information types used in a number of places, including referenced from a Message.

The problem is that the type of the structureRef field is a QName - however the Eclipse BPMN2 MDT model represents this as an object. Even thought at one point it was briefly defined as a QName, see:

https://github.com/eclipse/bpmn2/blob/1986cc3868f33d1214fc727f6f7208ba73e6761e/org.eclipse.bpmn2/src/org/eclipse/bpmn2/ItemDefinition.java (field is QName)
https://github.com/eclipse/bpmn2/blob/master/org.eclipse.bpmn2/src/org/eclipse/bpmn2/ItemDefinition.java (back to Object)
http://dev.eclipse.org/mhonarc/lists/mdt-bpmn2.dev/msg00143.html (related discussion)

Currently if a QName is added in the XML for the BPMN2 model, it does not appear in the structureRef field, probably because it is expecting a reference to an object in the model. This property may need to be handled in a special way in the property editor.
Comment 1 Reiner Hille CLA 2011-10-14 06:06:30 EDT
I'm still convinced that a reference to EObject is correct. In the XSD model of BPMN2 it is a QName, which is a clear sign that they expect a kind of valid reference to something (whatever something means). It could be a reference to an XSD complex type or Element. But it could also be a reference to any proprietary Data structure containing any kind of information. 
For the EMF model it means that it could point to an EObject from a private class, e.g. containing some strings. 
We had a similar discussion on the list some time ago. See here:
http://dev.eclipse.org/mhonarc/lists/mdt-bpmn2.dev/msg00151.html
There is even an example, how you could but a string into the structureRef property using the EOject proxyURI.
Comment 2 Brian Fitzpatrick CLA 2011-12-09 16:02:24 EST
Fixed.