cancel
Showing results for 
Search instead for 
Did you mean: 

Designer issues with Subprocess

mark1970
Champ in-the-making
Champ in-the-making
Hi all,
we're currentely evaluating using activiti for a BPMN 2.0 project.We would need to use intensively subprocesses, however we have found some issues with the designer.

#1 The generated BPMN 2.0 xml contains a wrong id for subprocesses' startEvent/endEvent.
See this example generated by Activiti Designer:

  <process id="helloworld" name="helloworld">
    <startEvent id="startevent1" name="Start"></startEvent>
    <endEvent id="endevent1" name="End"></endEvent>
    <subProcess id="subprocess1" name="Sub Process">
      <startEvent id="startevent2" name="Start"></startEvent>
      <serviceTask id="subprocess1_servicetask1" name="Service Task" activiti:class="sample.JavaService"></serviceTask>
      <endEvent id="endevent2" name="End"></endEvent>
      <sequenceFlow id="subprocess1_flow3" name="" sourceRef="subprocess1_startevent2" targetRef="subprocess1_servicetask1"></sequenceFlow>
      <sequenceFlow id="subprocess1_flow4" name="" sourceRef="subprocess1_servicetask1" targetRef="subprocess1_endevent2"></sequenceFlow>
    </subProcess>
    <sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="subprocess1"></sequenceFlow>
    <sequenceFlow id="flow2" name="" sourceRef="subprocess1" targetRef="endevent1"></sequenceFlow>
  </process>
Here, the sequenceFlow references a source node "subprocess1_startevent2" which should be rather "startevent2".
 <sequenceFlow id="subprocess1_flow3" name="" sourceRef="subprocess1_startevent2" targetRef="subprocess1_servicetask1"></sequenceFlow>
The same for subprocess1_flow4.

#2 We would need very much a reusable sub process definition in the Designer. Do you know in which release will be available Call Activity in the Eclipse Designer ?

Thanks a lot
Mark
14 REPLIES 14

aklemp
Champ in-the-making
Champ in-the-making
Hi,

I'm using the provided designer version 0.8.0.1 which is a great step forward in using call activities and inline subprocesses. Unfortunately I'm having a minor and a blocking issue with it.

The minor one: inline sub processes cannot be nested. This is currently not required but might be a nice feature for someone someday.

Far more critical is the call activity. Using it leads to an exception deep in the XML parser when opening the workflow again in the designer. I noticed that the attribute is now "calledElementRef" instead of "calledElement". Unfortunately, it doesn't work if I manually rename it back to "calledElement". I'm not sure why the designer must be able to resolve the workflow as it might be available at runtime only and not during design time.

Thanks a lot for your help in advance
  aklemp

Generated BPMN 2.0 snippet:

<bpmn2:CallActivity id="callactivity5" name="Call Activity" incoming="flow28" outgoing="flow133" calledElementRef="SubGraphTest1"/>
Error message:

Could not open the editor: org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved reference 'SubGraphTest1'. (platform:/resource/test/bpm/graph/GraphTest1.activiti, 1190, 134)
Stacktrace:

org.eclipse.emf.ecore.xmi.UnresolvedReferenceException: Unresolved reference 'SubGraphTest1'. (platform:/resource/test/bpm/graph/GraphTest1.activiti, 1190, 134)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardReferences(XMLHandler.java:1154)
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: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)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getEObject(ResourceSetImpl.java:216)
at org.eclipse.graphiti.ui.editor.DiagramEditorInput.getEObject(DiagramEditorInput.java:676)
at org.eclipse.graphiti.ui.editor.DiagramEditorInput.setEditorEditingDomain(DiagramEditorInput.java:571)
at org.eclipse.graphiti.ui.editor.DiagramEditorInput.<init>(DiagramEditorInput.java:268)
at org.eclipse.graphiti.ui.editor.DiagramEditorFactory.createEditorInput(DiagramEditorFactory.java:76)
at org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.init(DiagramEditorInternal.java:1063)
at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:237)
at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:211)
at org.activiti.designer.eclipse.editor.ActivitiMultiPageEditor.createDiagramPage(ActivitiMultiPageEditor.java:69)
at org.activiti.designer.eclipse.editor.ActivitiMultiPageEditor.createPages(ActivitiMultiPageEditor.java:89)
   […]

trademak
Star Contributor
Star Contributor
Thanks for reporting the calledElement bug. I'll look into it.
About the sub process nesting, yes this is a limitation at the moment.
In coming releases we may remove this limitation, if there's enough user request for this.

Best regards,

aklemp
Champ in-the-making
Champ in-the-making
Hi,

here is another issue with the designer 0.8.0.1. Using boundary timer events in activities of sub processes doesn't work correctly. The coordinates of the timer are not stored in the XML which leads to validation exceptions during deployment of the workflow. It is working correctly when adding a boundary timer event to the sub process directly (i.e. not to an embedded activity). But of course this is not a workaround since the timer leaves the sub process and not the activity.

Regards,
aklemp

trademak
Star Contributor
Star Contributor
Hi,

Right. I've fixed this in the trunk.

Best regards,

walterjs
Champ in-the-making
Champ in-the-making
I've had a go at implementing the nesting of sub-processes. Here is the JIRA.

http://jira.codehaus.org/browse/ACT-892.