Hi,
In my process I use Call Activity which references a sub process and this subprocess has two outgoing sequence flows.
When the Call Activiti subprocess completed, all the outgoing sequence flow executed. But i want the execution to happen based on the subprocess results.
Please can you help me how to resolve this ?
Activiti XML looks like below :
<?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:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://activiti.org/bpmn20">
<process id="SUBF" name="SUBF" isExecutable="true">
<extensionElements>
<activiti:executionListener xmlns:activiti="http://activiti.org/bpmn" class="com.datagenic.gwf.activiti.ProcessStartInterceptor" event="start"/>
<activiti:executionListener xmlns:activiti="http://activiti.org/bpmn" class="com.datagenic.gwf.activiti.ProcessEndInterceptor" event="end"/>
</extensionElements>
<sequenceFlow id="Start-start" name="Start-start" sourceRef="Start" targetRef="CF11"/>
<startEvent id="Start" name="Start"/>
<serviceTask id="LOGGERFAILED" name="LOGGERFAILED" activiti:class="com.datagenic.gwf.activiti.ActivitiAction"/>
<sequenceFlow id="LOGGERFAILED-ok" name="LOGGERFAILED-ok" sourceRef="LOGGERFAILED" targetRef="End"/>
<sequenceFlow id="LOGGERFAILED-Failure" name="LOGGERFAILED-Failure" sourceRef="LOGGERFAILED" targetRef="Failure"/>
<serviceTask id="LOGGERSUCCESS" name="LOGGERSUCCESS" activiti:class="com.datagenic.gwf.activiti.ActivitiAction"/>
<sequenceFlow id="LOGGERSUCCESS-ok" name="LOGGERSUCCESS-ok" sourceRef="LOGGERSUCCESS" targetRef="MAINEND"/>
<sequenceFlow id="LOGGERSUCCESS-Failure" name="LOGGERSUCCESS-Failure" sourceRef="LOGGERSUCCESS" targetRef="Failure"/>
<callActivity id="CF11" name="CF11" calledElement="CF1">
<documentation>CF1</documentation>
<extensionElements>
<activiti:executionListener class="com.datagenic.gwf.activiti.ProcessStartInterceptor" event="start"/>
<activiti:executionListener class="com.datagenic.gwf.activiti.ProcessEndInterceptor" event="end"/>
<actitivi:in xmlns:actitivi="http://activiti.org/bpmn" source="ROOT" target="ROOT"/>
<actitivi:in xmlns:actitivi="http://activiti.org/bpmn" source="JOB_EXECUTION_ID" target="JOB_EXECUTION_ID"/>
<actitivi:in xmlns:actitivi="http://activiti.org/bpmn" source="CURRENT" target="CURRENT"/>
</extensionElements>
</callActivity>
<sequenceFlow id="CF11-COPYFILESUCCESS" name="CF11-COPYFILESUCCESS" sourceRef="CF11" targetRef="LOGGERSUCCESS"/>
<sequenceFlow id="CF11-COPYFILEFAILED" name="CF11-COPYFILEFAILED" sourceRef="CF11" targetRef="LOGGERFAILED"/>
<endEvent id="End" name="End">
<documentation>failure</documentation>
</endEvent>
<endEvent id="MAINEND" name="MAINEND">
<documentation>success</documentation>
</endEvent>
<endEvent id="Failure" name="Failure">
<documentation>failure</documentation>
</endEvent>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_SUBF">
<bpmndi:BPMNPlane bpmnElement="SUBF" id="BPMNPlane_SUBF"/>
</bpmndi:BPMNDiagram>
</definitions>
That is the normal behaviour AFAIK - you should typically not have two outgoing sequence flows on a normal behaviour. Instead, have a single sequence flow go to a exclusive gateway, and from there you can have two outgoing sequence flows. The exclusive gateway knows how to handle multiple sequence flows, specifically that it can take your configuration (condition on sequence flow + default flow) to decide which one to take...
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.