cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple End or Start events

yangyang_qian
Champ in-the-making
Champ in-the-making
Can the Activiti engine handle multiple end events?

Say I have a process like the following …

Start –> task1  –> XOR  –> End1
…………………….|__> End2

where End1 vs End2 has some sort of business meaning (i.e. rejected vs approved)

If I were to execute this process, would the engine differentiate between the two end events, and would I be able to tell where it ended as a client of the engine?



Or, is this supposed to be the ideal usage …

Start –> task1  –> XOR  –> servicetask+CustomBehavior1 —-> End
……………………..|__> servicetask+CustomBehavior2 _________^



( I was playing around with the Activiti Designer and noticed that if the diagram had two end events in it … and it only seems to write end1 into the xml. I was hoping this was just a diagram translation issue …)


Thanks in advance!


PS: could also be that I just installed my Designer plugin wrong and now it's getting its revenge on me … is anyone getting this issue?

here's the contents acitiviti designer file I was playing around with … (don't know why I'm not allowed to attach the file directly) … hopefully this can be copy-pasted into another activiti file for duplication.


<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL-XMI" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms">
  <pi:Diagram visible="true" gridUnit="10" diagramTypeId="BPMNdiagram" name="multiends" snapToGrid="true" showGuides="true" pictogramLinks="/0/@children.0/@link /0/@children.0/@children.0/@link /0/@children.1/@link /0/@children.1/@children.0/@link /0/@children.2/@link /0/@children.2/@children.0/@link /0/@children.3/@link /0/@children.3/@children.0/@link /0/@connections.0/@link /0/@children.4/@link /0/@connections.1/@link /0/@connections.2/@link /0/@connections.3/@link">
    <graphicsAlgorithm xsi:type="al:Rectangle" background="/0/@colors.1" foreground="/0/@colors.0" width="1000" height="1000"/>
    <children xsi:type="pi:ContainerShape" visible="true" active="true">
      <graphicsAlgorithm xsi:type="al:Ellipse" filled="false" lineVisible="false" width="55" height="55" x="362" y="150">
        <graphicsAlgorithmChildren xsi:type="al:Ellipse" width="55" height="55" style="/0/@styles.0"/>
      </graphicsAlgorithm>
      <link businessObjects="startevent1"/>
      <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="/0/@connections.0"/>
      <anchors xsi:type="pi:BoxRelativeAnchor" visible="true" active="true" referencedGraphicsAlgorithm="/0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0" relativeWidth="1.0" relativeHeight="0.51">
        <graphicsAlgorithm xsi:type="al:Ellipse" filled="false" lineVisible="false"/>
      </anchors>
      <children visible="true">
        <graphicsAlgorithm xsi:type="al:Text" width="55" height="55" style="/0/@styles.1" horizontalAlignment="ALIGNMENT_CENTER" value="Start">
          <font name="Arial" size="8" bold="true"/>
        </graphicsAlgorithm>
        <link businessObjects="startevent1"/>
      </children>
    </children>
    <children xsi:type="pi:ContainerShape" visible="true" active="true">
      <graphicsAlgorithm xsi:type="al:Ellipse" filled="false" lineVisible="false" width="55" height="55" x="283" y="430">
        <graphicsAlgorithmChildren xsi:type="al:Ellipse" width="55" height="55" style="/0/@styles.0"/>
      </graphicsAlgorithm>
      <link businessObjects="endevent1"/>
      <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="/0/@connections.2"/>
      <children visible="true">
        <graphicsAlgorithm xsi:type="al:Text" width="55" height="55" style="/0/@styles.2" horizontalAlignment="ALIGNMENT_CENTER" value="End1">
          <font name="Arial" size="8" bold="true"/>
        </graphicsAlgorithm>
        <link businessObjects="endevent1"/>
      </children>
    </children>
    <children xsi:type="pi:ContainerShape" visible="true" active="true">
      <graphicsAlgorithm xsi:type="al:Ellipse" filled="false" lineVisible="false" width="55" height="55" x="430" y="430">
        <graphicsAlgorithmChildren xsi:type="al:Ellipse" width="55" height="55" style="/0/@styles.0"/>
      </graphicsAlgorithm>
      <link businessObjects="endevent2"/>
      <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="/0/@connections.3"/>
      <children visible="true">
        <graphicsAlgorithm xsi:type="al:Text" width="55" height="55" style="/0/@styles.3" horizontalAlignment="ALIGNMENT_CENTER" value="End2">
          <font name="Arial" size="8" bold="true"/>
        </graphicsAlgorithm>
        <link businessObjects="endevent2"/>
      </children>
    </children>
    <children xsi:type="pi:ContainerShape" visible="true" active="true">
      <graphicsAlgorithm xsi:type="al:Rectangle" filled="false" lineVisible="false" width="105" height="55" x="337" y="240">
        <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" width="105" height="55" style="/0/@styles.0" cornerHeight="5" cornerWidth="5"/>
      </graphicsAlgorithm>
      <link businessObjects="usertask7"/>
      <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="/0/@connections.1" incomingConnections="/0/@connections.0"/>
      <anchors xsi:type="pi:BoxRelativeAnchor" visible="true" active="true" referencedGraphicsAlgorithm="/0/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0" relativeWidth="1.0" relativeHeight="0.51">
        <graphicsAlgorithm xsi:type="al:Ellipse" filled="false" lineVisible="false"/>
      </anchors>
      <children visible="true">
        <graphicsAlgorithm xsi:type="al:Text" width="105" height="20" y="20" style="/0/@styles.5" horizontalAlignment="ALIGNMENT_CENTER" value="myTask">
          <font name="Arial" size="8" bold="true"/>
        </graphicsAlgorithm>
        <link businessObjects="usertask7"/>
      </children>
      <children visible="true">
        <graphicsAlgorithm xsi:type="al:Image" width="16" height="16" x="5" y="5" id="org.activiti.designer.usertask" stretchH="false" stretchV="false" proportional="false"/>
      </children>
    </children>
    <children xsi:type="pi:ContainerShape" visible="true" active="true">
      <graphicsAlgorithm xsi:type="al:Polygon" filled="false" lineVisible="false" width="60" height="60" x="359" y="330">
        <graphicsAlgorithmChildren xsi:type="al:Polygon" width="60" height="60" style="/0/@styles.0">
          <points y="30"/>
          <points x="30"/>
          <points x="60" y="30"/>
          <points x="30" y="60"/>
          <points y="30"/>
        </graphicsAlgorithmChildren>
        <points y="30"/>
        <points x="30"/>
        <points x="60" y="30"/>
        <points x="30" y="60"/>
        <points y="30"/>
      </graphicsAlgorithm>
      <link businessObjects="exclusivegateway7"/>
      <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="/0/@connections.2 /0/@connections.3" incomingConnections="/0/@connections.1"/>
      <anchors xsi:type="pi:BoxRelativeAnchor" visible="true" active="true" referencedGraphicsAlgorithm="/0/@children.4/@graphicsAlgorithm/@graphicsAlgorithmChildren.0" relativeWidth="0.51" relativeHeight="0.1">
        <graphicsAlgorithm xsi:type="al:Ellipse" filled="false" lineVisible="false"/>
      </anchors>
      <anchors xsi:type="pi:ChopboxAnchor"/>
      <anchors xsi:type="pi:BoxRelativeAnchor" visible="true" active="true" referencedGraphicsAlgorithm="/0/@children.4/@graphicsAlgorithm/@graphicsAlgorithmChildren.0" relativeWidth="0.51" relativeHeight="0.93">
        <graphicsAlgorithm xsi:type="al:Ellipse" filled="false" lineVisible="false"/>
      </anchors>
      <children visible="true">
        <graphicsAlgorithm xsi:type="al:Polyline" lineWidth="7" filled="false" style="/0/@styles.0">
          <points x="45" y="15"/>
          <points x="15" y="45"/>
        </graphicsAlgorithm>
      </children>
      <children visible="true">
        <graphicsAlgorithm xsi:type="al:Polyline" lineWidth="7" filled="false" style="/0/@styles.0">
          <points x="15" y="15"/>
          <points x="45" y="45"/>
        </graphicsAlgorithm>
      </children>
    </children>
    <styles foreground="/0/@colors.2" lineWidth="2" id="BPMN-CLASS">
      <renderingStyle>
        <adaptedGradientColoredAreas definedStyleId="blue-white-gloss" gradientType="0">
          <adaptedGradientColoredAreas styleAdaption="0">
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="0">
                <color red="248" green="251" blue="254"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="1">
                <color red="248" green="251" blue="254"/>
              </end>
            </gradientColor>
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="1">
                <color red="237" green="245" blue="252"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="2">
                <color red="237" green="245" blue="252"/>
              </end>
            </gradientColor>
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="2">
                <color red="222" green="237" blue="250"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="3">
                <color red="222" green="237" blue="250"/>
              </end>
            </gradientColor>
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="3">
                <color red="212" green="231" blue="248"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="2">
                <color red="250" green="251" blue="252"/>
              </end>
            </gradientColor>
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="2">
                <color red="226" green="229" blue="233"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="0">
                <color red="226" green="229" blue="233"/>
              </end>
            </gradientColor>
          </adaptedGradientColoredAreas>
          <adaptedGradientColoredAreas styleAdaption="1">
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="0">
                <color red="238" green="246" blue="253"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="1">
                <color red="238" green="246" blue="253"/>
              </end>
            </gradientColor>
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="1">
                <color red="208" green="230" blue="249"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="2">
                <color red="208" green="230" blue="249"/>
              </end>
            </gradientColor>
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="2">
                <color red="172" green="210" blue="244"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="3">
                <color red="172" green="210" blue="244"/>
              </end>
            </gradientColor>
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="3">
                <color red="129" green="185" blue="234"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="2">
                <color red="170" green="208" blue="242"/>
              </end>
            </gradientColor>
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="2">
                <color red="154" green="191" blue="224"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="0">
                <color red="154" green="191" blue="224"/>
              </end>
            </gradientColor>
          </adaptedGradientColoredAreas>
          <adaptedGradientColoredAreas styleAdaption="2">
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="0">
                <color red="245" green="249" blue="254"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="1">
                <color red="245" green="249" blue="254"/>
              </end>
            </gradientColor>
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="1">
                <color red="226" green="239" blue="252"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="2">
                <color red="226" green="239" blue="252"/>
              </end>
            </gradientColor>
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="2">
                <color red="203" green="227" blue="249"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="3">
                <color red="203" green="227" blue="249"/>
              </end>
            </gradientColor>
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="3">
                <color red="187" green="218" blue="247"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="2">
                <color red="197" green="224" blue="247"/>
              </end>
            </gradientColor>
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="2">
                <color red="178" green="205" blue="229"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="0">
                <color red="178" green="205" blue="229"/>
              </end>
            </gradientColor>
          </adaptedGradientColoredAreas>
          <adaptedGradientColoredAreas styleAdaption="3">
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="0">
                <color red="153" green="204"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="0">
                <color red="51" green="153" blue="102"/>
              </end>
            </gradientColor>
          </adaptedGradientColoredAreas>
          <adaptedGradientColoredAreas styleAdaption="4">
            <gradientColor>
              <start locationType="LOCATION_TYPE_ABSOLUTE_START" locationValue="0">
                <color red="255" green="204"/>
              </start>
              <end locationType="LOCATION_TYPE_ABSOLUTE_END" locationValue="0">
                <color red="255" green="102"/>
              </end>
            </gradientColor>
          </adaptedGradientColoredAreas>
        </adaptedGradientColoredAreas>
      </renderingStyle>
    </styles>
    <styles foreground="/0/@colors.3" id="BPMNCLASS-TEXT"/>
    <styles foreground="/0/@colors.3" id="BPMNCLASS-TEXT"/>
    <styles foreground="/0/@colors.3" id="BPMNCLASS-TEXT"/>
    <styles foreground="/0/@colors.3" id="BPMNCLASS-TEXT"/>
    <styles foreground="/0/@colors.3" id="BPMNCLASS-TEXT"/>
    <styles foreground="/0/@colors.3" id="BPMNCLASS-TEXT"/>
    <styles background="/0/@colors.4" foreground="/0/@colors.4" id="BPMN-POLYGON-ARROW"/>
    <styles foreground="/0/@colors.3" id="BPMNCLASS-TEXT"/>
    <styles foreground="/0/@colors.3" id="BPMNCLASS-TEXT"/>
    <styles foreground="/0/@colors.3" id="BPMNCLASS-TEXT"/>
    <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="/0/@children.0/@anchors.0" end="/0/@children.3/@anchors.0">
      <graphicsAlgorithm xsi:type="al:Polyline" foreground="/0/@colors.4" filled="false"/>
      <link businessObjects="flow33"/>
      <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
        <graphicsAlgorithm xsi:type="al:Text" x="10" style="/0/@styles.6" value="">
          <font name="Arial" size="8"/>
        </graphicsAlgorithm>
      </connectionDecorators>
      <connectionDecorators visible="true" locationRelative="true" location="1.0">
        <graphicsAlgorithm xsi:type="al:Polygon" style="/0/@styles.7">
          <points x="-10" y="-5" before="3" after="3"/>
          <points/>
          <points x="-10" y="5" before="3" after="3"/>
          <points x="-8" before="3" after="3"/>
        </graphicsAlgorithm>
      </connectionDecorators>
    </connections>
    <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="/0/@children.3/@anchors.0" end="/0/@children.4/@anchors.0">
      <graphicsAlgorithm xsi:type="al:Polyline" foreground="/0/@colors.4" filled="false"/>
      <link businessObjects="flow34"/>
      <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
        <graphicsAlgorithm xsi:type="al:Text" x="10" style="/0/@styles.8" value="">
          <font name="Arial" size="8"/>
        </graphicsAlgorithm>
      </connectionDecorators>
      <connectionDecorators visible="true" locationRelative="true" location="1.0">
        <graphicsAlgorithm xsi:type="al:Polygon" style="/0/@styles.7">
          <points x="-10" y="-5" before="3" after="3"/>
          <points/>
          <points x="-10" y="5" before="3" after="3"/>
          <points x="-8" before="3" after="3"/>
        </graphicsAlgorithm>
      </connectionDecorators>
    </connections>
    <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="/0/@children.4/@anchors.0" end="/0/@children.1/@anchors.0">
      <graphicsAlgorithm xsi:type="al:Polyline" foreground="/0/@colors.4" filled="false"/>
      <link businessObjects="flow35"/>
      <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
        <graphicsAlgorithm xsi:type="al:Text" x="10" style="/0/@styles.9" value="to1">
          <font name="Arial" size="8"/>
        </graphicsAlgorithm>
      </connectionDecorators>
      <connectionDecorators visible="true" locationRelative="true" location="1.0">
        <graphicsAlgorithm xsi:type="al:Polygon" style="/0/@styles.7">
          <points x="-10" y="-5" before="3" after="3"/>
          <points/>
          <points x="-10" y="5" before="3" after="3"/>
          <points x="-8" before="3" after="3"/>
        </graphicsAlgorithm>
      </connectionDecorators>
    </connections>
    <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="/0/@children.4/@anchors.0" end="/0/@children.2/@anchors.0">
      <graphicsAlgorithm xsi:type="al:Polyline" foreground="/0/@colors.4" filled="false"/>
      <link businessObjects="flow36"/>
      <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
        <graphicsAlgorithm xsi:type="al:Text" x="10" style="/0/@styles.10" value="to2">
          <font name="Arial" size="8"/>
        </graphicsAlgorithm>
      </connectionDecorators>
      <connectionDecorators visible="true" locationRelative="true" location="1.0">
        <graphicsAlgorithm xsi:type="al:Polygon" style="/0/@styles.7">
          <points x="-10" y="-5" before="3" after="3"/>
          <points/>
          <points x="-10" y="5" before="3" after="3"/>
          <points x="-8" before="3" after="3"/>
        </graphicsAlgorithm>
      </connectionDecorators>
    </connections>
    <colors red="227" green="238" blue="249"/>
    <colors red="255" green="255" blue="255"/>
    <colors red="25" green="25" blue="112"/>
    <colors red="51" green="51" blue="153"/>
    <colors/>
  </pi:Diagram>
  <bpmn2:Process id="helloworld" name="helloworld">
    <documentation id="documentation_process" text=""/>
  </bpmn2:Process>
  <bpmn2:StartEvent id="startevent1" name="Start" outgoing="flow33"/>
  <bpmn2:EndEvent id="endevent1" name="End1" incoming="flow35"/>
  <bpmn2:EndEvent id="endevent2" name="End2" incoming="flow36"/>
  <bpmn2:UserTask id="usertask7" name="myTask" incoming="flow33" outgoing="flow34" assignee="YYQ" formKey=""/>
  <bpmn2:SequenceFlow id="flow33" name="" sourceRef="startevent1" targetRef="usertask7"/>
  <bpmn2:ExclusiveGateway id="exclusivegateway7" name="Exclusive Gateway" incoming="flow34" outgoing="flow35 flow36"/>
  <bpmn2:SequenceFlow id="flow34" name="" sourceRef="usertask7" targetRef="exclusivegateway7"/>
  <bpmn2:SequenceFlow id="flow35" name="to1" sourceRef="exclusivegateway7" targetRef="endevent1">
    <conditionExpression id="flow35_condition" body="${foo == 1}"/>
  </bpmn2:SequenceFlow>
  <bpmn2:SequenceFlow id="flow36" name="to2" sourceRef="exclusivegateway7" targetRef="endevent2">
    <conditionExpression id="flow36_condition" body="${foo != 1}"/>
  </bpmn2:SequenceFlow>
</xmi:XMI>

4 REPLIES 4

frederikherema1
Star Contributor
Star Contributor
Hi,

Activiti can indeed handle multiple end events. If you want to know what end-event has been chosen by your process-instance, you should have a look at the HistoricProcessInstance (http://activiti.org/userguide/index.html#history)


HistoricProcessInstance hip = historyService.createHistoricProcessInstanceQuery().processInstanceId("123").singleResult();
String endActivitiId = hip.getEndActivityId();

About the designer-file, looks like the 2 end events are in there:

<bpmn2:EndEvent id="endevent1" name="End1" incoming="flow35"/>
  <bpmn2:EndEvent id="endevent2" name="End2" incoming="flow36"/>

Once you export the process to a bpmn 2.0 in the designer, you can use it in activiti.

yangyang_qian
Champ in-the-making
Champ in-the-making
Oh cool, I'll definitely try out the HistoricProcessInstance class.

Sorry if I was a bit unclear about the code dump … yes the end events are in this dump from the foo.activiti file.

But I've found that when I save it in my Activiti Designer and it is transformed (on save) into the foo.activiti.bpmn20.xml  or  exported (the Export to BPMN 2.0 XML right-click option) into the   foo.bpmn20.xml   , all but first end event nodes are missing. Trying to run unit tests on the foo.activiti.bpmn20.xml version of this process just generates an error right off the bat …


org.activiti.engine.ActivitiException: cvc-id.1: There is no ID/IDREF binding for IDREF 'endevent2'. | multiEndTests/multiends.activiti.bpmn20.xml | line 1 | column 1268
Invalid destination 'endevent2' of sequence flow 'flow36' | multiEndTests/multiends.activiti.bpmn20.xml | line 1 | column 1086

at org.activiti.engine.impl.util.xml.Parse.throwActivitiExceptionForErrors(Parse.java:186)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:225)
at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:63)
at org.activiti.engine.impl.db.DbRepositorySession.deployNew(DbRepositorySession.java:63)
at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:52)
at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:30)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:22)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:37)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:43)
at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:103)
at org.activiti.engine.impl.test.TestHelper.annotationDeploymentSetUp(TestHelper.java:93)
at org.activiti.engine.impl.test.AbstractActivitiTestCase.runBare(AbstractActivitiTestCase.java:83)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


so strangely it looks like the sequence flows are there, but not the end events.

Just wanted to know if others are getting this issue, since I am not sure if it was just my installation of the Activiti Designer that is an issue or if it's a bug with Designer itself.

trademak
Star Contributor
Star Contributor
Hi,

This is a bug in the Activiti Designer. Currently we only support one start and end event.
But that was mainly there for some first validation rules that were implemented, so there's no reason why we wouldn't allow multiple start and end events.
Can you create a JIRA issue for this?

Thanks,

Tijs Rademakers
Lead developer Activiti Designer

yangyang_qian
Champ in-the-making
Champ in-the-making
I've submitted JIRA ACT-474 .

Btw, I've settled with a workaround of using multiple ServiceTask nodes that handle all of the custom endstate behavior, and all of the flows just go to the same endState. I only did this to make it easier to move between the Activiti Designer and functional XML …