AnsweredAssumed Answered

Paralel CallActivity executes child workflow sequentially

Question asked by alper on Nov 25, 2014
Latest reply on Nov 25, 2014 by alper
Hi,

I need to make a multiinstance CallActivity node that will invoke concurrently a child workflow that contains exclusive gateway. So there should be N instances of child workflows running independently. But according to my tests they are invoked sequentially though multiInstanceLoopCharacteristics isSequential="false" for the parent node!
What am I doing wrong?


The parent multiinstance CallActivity node, it looks like:

  <process id="paralel" name="My process" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <endEvent id="endevent1" name="End"></endEvent>
    <callActivity id="callactivity1" name="Call activity" calledElement="fork">
      <extensionElements>
        <activiti:in source="task" target="task"></activiti:in>
      </extensionElements>
      <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="tasksList" activiti:elementVariable="task"></multiInstanceLoopCharacteristics>
    </callActivity>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="callactivity1"></sequenceFlow>
    <sequenceFlow id="flow2" sourceRef="callactivity1" targetRef="endevent1"></sequenceFlow>
  </process>


It is supposed to call concurrently the child workflow, it looks like:


  <process id="fork" name="My process" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <endEvent id="endevent1" name="End"></endEvent>
    <serviceTask id="sys1" name="Service Task" activiti:class="my.nodes.Rest"></serviceTask>
    <serviceTask id="sys2" name="Service Task" activiti:class="my.nodes.Rest"></serviceTask>
    <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="exclusivegateway1"></sequenceFlow>
    <sequenceFlow id="flow2" sourceRef="exclusivegateway1" targetRef="sys1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${task.externalSystem ==
            "sys1"}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow3" sourceRef="exclusivegateway1" targetRef="sys2">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${task.externalSystem
            == "sys2"}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow4" sourceRef="sys1" targetRef="endevent1"></sequenceFlow>
    <endEvent id="endevent2" name="End"></endEvent>
    <sequenceFlow id="flow5" sourceRef="sys2" targetRef="endevent2"></sequenceFlow>
  </process>

Outcomes