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

Bug 367768

Summary: Operation advanced property Error Refs does not allow selection of Message
Product: [SOA] BPMN2Modeler Reporter: Gary Brown <gary>
Component: ToolsAssignee: Robert Brodt <bbrodt>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 0.0.1-M1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
BPMN2 example that demonstrates the Error Ref exception none

Description Gary Brown CLA 2012-01-03 10:19:16 EST
Build Identifier: 

I created an Interface and Operation, and within the operation selected the incoming and outgoing messages, based on Message components previously defined.

However when selecting the Error Refs button to bring up the selection dialog, the selection is empty - even though in this particular choreography there are many messages defined.

I then edit the bpmn file directly to enter a valid message reference (what I believe is valid anyway), and when going back into the editor's advanced prop tab for the operation, it displays the following exception:

java.lang.ArrayStoreException
	at org.eclipse.emf.common.util.BasicEList.assign(BasicEList.java:124)
	at org.eclipse.emf.ecore.util.EcoreEList.resolve(EcoreEList.java:172)
	at org.eclipse.emf.ecore.util.EObjectResolvingEList.resolve(EObjectResolvingEList.java:66)
	at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:354)
	at org.eclipse.bpmn2.modeler.ui.property.editors.FeatureListObjectEditor.updateTextField(FeatureListObjectEditor.java:143)
	at org.eclipse.bpmn2.modeler.ui.property.editors.FeatureListObjectEditor.createControl(FeatureListObjectEditor.java:79)
	at org.eclipse.bpmn2.modeler.ui.property.editors.ObjectEditor.createControl(ObjectEditor.java:50)
	at org.eclipse.bpmn2.modeler.ui.property.AbstractBpmn2PropertiesComposite.bindReference(AbstractBpmn2PropertiesComposite.java:521)
	at org.eclipse.bpmn2.modeler.ui.property.DefaultPropertiesComposite.createBindings(DefaultPropertiesComposite.java:112)
	at org.eclipse.bpmn2.modeler.ui.property.AbstractBpmn2PropertiesComposite.setEObject(AbstractBpmn2PropertiesComposite.java:196)
	at org.eclipse.bpmn2.modeler.ui.property.AbstractBpmn2PropertiesComposite.setEObject(AbstractBpmn2PropertiesComposite.java:185)
	at org.eclipse.bpmn2.modeler.ui.property.AdvancedPropertiesComposite.updateDetailsSection(AdvancedPropertiesComposite.java:250)
	at org.eclipse.bpmn2.modeler.ui.property.AdvancedPropertiesComposite.access$1(AdvancedPropertiesComposite.java:217)
	at org.eclipse.bpmn2.modeler.ui.property.AdvancedPropertiesComposite$1.selectionChanged(AdvancedPropertiesComposite.java:140)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162)
	at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2188)
	at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1211)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1241)
	at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:239)
	at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:233)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:403)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	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:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	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)



Reproducible: Always

Steps to Reproduce:
1. Load the attached choreography (when attached)
2. Select the advanced tab properties associated with the canvas
3. At the bottom, select the operation within the first interface (operation name is 'buy')
4. This will create the exception
5. To check out the blank dialog, remove the 'bpmn2:errorRef' element under the interface's operation, and then enter the editor again and press the 'Edit' button associated with the Error Refs field.
Comment 1 Gary Brown CLA 2012-01-03 10:21:12 EST
Created attachment 208940 [details]
BPMN2 example that demonstrates the Error Ref exception

Throws the exception when the bpmn2:errorRef element is present, and a blank dialog window for the Error Refs field on the Operation component, when not present, even though many Message components exist.
Comment 2 Robert Brodt CLA 2012-01-05 15:06:25 EST
The "buy" Operation's errorRef was set to Message_6, but according to the BPMN2 spec, this should be a reference to an "Error" object, not a "Message".

I think the reason why you were confused is because The "Data Items" property tab (displayed when the canvas is clicked) was missing an "Error List" which allows you to create & manage Error definitions. This is fixed now, allowing you to select an Error definition for the operation's Error Ref.
Comment 3 Gary Brown CLA 2012-01-06 04:09:35 EST
Thanks Bob - although this highlights a problem with the bpmn2 model, as the Error objects cannot be used as messages in message flows and therefore choreographies/collaborations, so means having a Message and Error object pointing to the same ItemDefinition, one for use in the Interface/Operation, and one for use in the MessageFlow.

Might have been better to derive the Error from Message - if the working group ever starts up again I might see if this is a potential change.

The addition of the Error List on the Data Items tab is not available in the latest update site, but possibly that was built before doing this change?