cancel
Showing results for 
Search instead for 
Did you mean: 

Designer, ids, inconsistencies

tam
Champ in-the-making
Champ in-the-making
I am currently evaluating a few BPM platforms, including activiti 5.9, for a client. I got a series of quirks and errors from the Eclipse designer. As no one else appears to have similar trouble, I guess I'm missing something, but don't know where to start fixing the problems.

Currently, the main problem that gets me stuck occurs with the following simple model:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<collaboration id="Collaboration">
<participant id="pool1" name="Bewirtungsantrag" processRef="process_pool1"></participant>
</collaboration>
<process id="process_pool1" name="process_pool1">
<laneSet id="laneSet_process_pool1">
<lane id="lane1" name="Antragsteller">
<flowNodeRef>startevent1</flowNodeRef>
<flowNodeRef>usertask1</flowNodeRef>
<flowNodeRef>endevent1</flowNodeRef>
</lane>
</laneSet>
<startEvent id="startevent1" name="Start"></startEvent>
<userTask id="usertask1" name="Antrag erfassen"></userTask>
<sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow2" name="" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_process1">
<bpmndi:BPMNPlane bpmnElement="process1" id="BPMNPlane_process1">
<bpmndi:BPMNShape bpmnElement="pool1" id="BPMNShape_pool1" isHorizontal="true">
<omgdc:Bounds height="150" width="500" x="80" y="150"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="lane1" id="BPMNShape_lane1" isHorizontal="true">
<omgdc:Bounds height="150" width="480" x="100" y="150"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35" width="35" x="160" y="220"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
<omgdc:Bounds height="55" width="105" x="240" y="210"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35" width="35" x="400" y="220"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="195" y="237"></omgdi:waypoint>
<omgdi:waypoint x="240" y="237"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="345" y="237"></omgdi:waypoint>
<omgdi:waypoint x="400" y="237"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>

This was created via the Eclipse designer. In previous models, I had got into major trouble when changing ids of model objects, so in this model I didn't touch any ids, just the names. Still, deploying yields the error message:

"Invalid reference in 'bpmnElement' attribute, process process1 not found… line 21 column 70"

The designer had given the process (that you see when clicking outside the pool) the id process1, but the pool process (that you see when clicking in the pool, tab process) the id process_pool1, so I guessed that the deploy mechanism expects those two to be the same. So, again via the designer, I changed the id inside the pool to process1, yielding this model:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<collaboration id="Collaboration">
<participant id="pool1" name="Bewirtungsantrag" processRef="process_pool1"></participant>
</collaboration>
<process id="process1" name="process_pool1">
<laneSet id="laneSet_process1">
<lane id="lane1" name="Antragsteller">
<flowNodeRef>startevent1</flowNodeRef>
<flowNodeRef>usertask1</flowNodeRef>
<flowNodeRef>endevent1</flowNodeRef>
</lane>
</laneSet>
<startEvent id="startevent1" name="Start"></startEvent>
<userTask id="usertask1" name="Antrag erfassen"></userTask>
<sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow2" name="" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_process1">
<bpmndi:BPMNPlane bpmnElement="process1" id="BPMNPlane_process1">
<bpmndi:BPMNShape bpmnElement="pool1" id="BPMNShape_pool1" isHorizontal="true">
<omgdc:Bounds height="150" width="500" x="80" y="150"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35" width="35" x="160" y="220"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
<omgdc:Bounds height="55" width="105" x="240" y="210"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35" width="35" x="400" y="220"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="195" y="237"></omgdi:waypoint>
<omgdi:waypoint x="240" y="237"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="345" y="237"></omgdi:waypoint>
<omgdi:waypoint x="400" y="237"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>

After this simple change, the graphical designer keeps issuing Null Pointer Exceptions. Closing and re-opening the diagram leads to an empty screen. The model is still there and can be viewed as text, but the designer can't show it any more. Please note that I only edited it via the graphical editor, not by direct manipulation of the XML text. This is the stack trace:

java.lang.NullPointerException
at org.activiti.designer.property.PropertyDiagramSection.refresh(PropertyDiagramSection.java:94)
at org.eclipse.ui.views.properties.tabbed.TabContents$6.run(TabContents.java:217)
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.ui.views.properties.tabbed.TabContents.refresh(TabContents.java:220)
at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage$SelectionChangedListener.selectionChanged(TabbedPropertySheetPage.java:222)
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:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
at org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyList.select(TabbedPropertyList.java:664)
at org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyViewer.setSelectionToWidget(TabbedPropertyViewer.java:122)
at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget(StructuredViewer.java:1767)
at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1723)
at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:394)
at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.setInput(TabbedPropertySheetPage.java:736)
at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.selectionChanged(TabbedPropertySheetPage.java:555)
at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:365)
at org.eclipse.ui.internal.e4.compatibility.SelectionService.notifyListeners(SelectionService.java:140)
at org.eclipse.ui.internal.e4.compatibility.SelectionService.access$3(SelectionService.java:137)
at org.eclipse.ui.internal.e4.compatibility.SelectionService$1.selectionChanged(SelectionService.java:72)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$2.run(SelectionAggregator.java:111)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator.notifyListeners(SelectionAggregator.java:109)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator.access$4(SelectionAggregator.java:106)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$4$1.run(SelectionAggregator.java:163)
at org.eclipse.e4.core.contexts.RunAndTrack.runExternalCode(RunAndTrack.java:53)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$4.changed(SelectionAggregator.java:161)
at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:109)
at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:308)
at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:322)
at org.eclipse.e4.ui.internal.workbench.SelectionServiceImpl.setSelection(SelectionServiceImpl.java:30)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.selectionChanged(CompatibilityPart.java:420)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.fireSelectionChanged(AbstractEditPartViewer.java:247)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer$1.run(AbstractEditPartViewer.java:131)
at org.eclipse.gef.SelectionManager.fireSelectionChanged(SelectionManager.java:144)
at org.eclipse.gef.SelectionManager.appendSelection(SelectionManager.java:83)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.appendSelection(AbstractEditPartViewer.java:190)
at org.eclipse.graphiti.ui.internal.editor.GraphitiScrollingGraphicalViewer.appendSelection(GraphitiScrollingGraphicalViewer.java:138)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.select(AbstractEditPartViewer.java:599)
at org.eclipse.graphiti.ui.internal.editor.GraphitiScrollingGraphicalViewer.select(GraphitiScrollingGraphicalViewer.java:45)
at org.eclipse.gef.tools.SelectEditPartTracker.performSelection(SelectEditPartTracker.java:221)
at org.eclipse.gef.tools.SelectEditPartTracker.performConditionalSelection(SelectEditPartTracker.java:167)
at org.eclipse.gef.tools.SelectEditPartTracker.handleButtonDown(SelectEditPartTracker.java:92)
at org.eclipse.gef.tools.AbstractTool.mouseDown(AbstractTool.java:1091)
at org.eclipse.gef.tools.SelectionTool.mouseDown(SelectionTool.java:514)
at org.eclipse.gef.EditDomain.mouseDown(EditDomain.java:245)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMousePressed(DomainEventDispatcher.java:348)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown(LightweightSystem.java:523)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:192)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
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:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
eclipse.buildId=I20120608-1400
java.version=1.6.0_11
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -plugincustomization ./eclipse.preferences.ini -perspective org.jbpm.eclipse.JBPMPerspective
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -data C:\Dokumente und Einstellungen\matznert\workspace -plugincustomization ./eclipse.preferences.ini -perspective org.jbpm.eclipse.JBPMPerspective

The problem is reproducible, i.e. when I delete the entire model file and draw it again, the errors persist. At this point, I am stuck with my evaluation. The problem described above keeps me from performing even the simplest design - deploy - run cycle. In addition, I am reluctant to continue modeling. When the designer fails, like described above, to display a nontrivial model, then probably all modeling work done so far will be lost.

In previous attempts, I had come across another error concerning ids: I had entered ids that were syntactically wrong (containing a space). The designer didn't raise an error, so I thought I was allowed to use these ids. Only during deployment the error was detected. So I went back to the designer, removing the spaces from the ids. But this lead to quite a few "there is no id/idref binding" errors during deployment, so the tool had not consistently propagated those changed ids throughout the model. As a consequence, later on I didn't change any ids generated by the tool at all, as the editing of ids appeared unstable to me.

This leads to the following questions:

1. What's wrong with the two files included above, and how should the error be fixed?

2. Are there any restrictions on ids of model elements? E.g. how do the two process ids mentioned above (in the Process and Pool) correlate? Do they need the same id, or a different one, and why are there two of them at all?

3. May ids of elements be changed, and how can I make sure that all references to those ids will be kept consistent?

4. What can be the reason for NPEs in the designer, and how can they be avoided?
5 REPLIES 5

trademak
Star Contributor
Star Contributor
Hi,

That's definitely a bug. I'll look into this right now and add a fix for it.
The BPMN DI element is not generated correctly.

Best regards,

trademak
Star Contributor
Star Contributor
Hi,

Yes I found the bug and it's now fixed on trunk. I expect to release a new version of the Designer in a couple of weeks.

Best regards,

pfeiffer
Champ in-the-making
Champ in-the-making
Hi, I retrieved the latest eclipse designer version and I see indeed now the bpmn elements using the 'Collaboration' id as reference, but I have problems changing the process id.

Initially the id is process_pool1 and when I click on the pool element and go to the process tab to change the id, it throws a nullpointerexception. It seems that changing the process id there changes the id of the processRef attribute of the <participant> element but not the id  of the process itself.

It is happening consistently every time so it should be easiliy able to reproduce. We would really like to use pools and lanes in our diagrams which will greatly increase the readability.

frederikherema1
Star Contributor
Star Contributor
Thats seems like another issue. Can you create a JIRA-issue for it, in the component Designer?

pfeiffer
Champ in-the-making
Champ in-the-making
I created Issue: http://jira.codehaus.org/browse/ACT-1419 for the process id changing problem