AnsweredAssumed Answered

Activiti BPM 6 internal flow architecture

Question asked by rohitrocks26 on Feb 14, 2018
Latest reply on Feb 15, 2018 by ryandawson

I am new to this Activiti 6 .. I am just trying to understand how activiti engine executes the flow..I know that it parse the xml file aand store in process def and byte array table.. But internally how Activiti engine knows that after this event trigger the next one ?  

 

Lets say if this is my xml
<process id="myProcess" name="My process" isExecutable="true">
<startEvent id="startevent1" name="Start" activiti:initiator="initiator"></startEvent>
<exclusiveGateway id="decide" name="num"></exclusiveGateway>
<scriptTask id="scripttask2" name="Script Task" scriptFormat="groovy" activiti:autoStoreVariables="false">
<script>out:println "Hello !!! Number is greater than 10";</script>
</scriptTask>
<scriptTask id="scripttask3" name="Script Task" scriptFormat="groovy" activiti:autoStoreVariables="false">
<script>out:println "Hello !!! Number is less than 10";</script>
</scriptTask>
<sequenceFlow id="flow3" name="&lt;10" sourceRef="decide" targetRef="scripttask3">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${num < 10}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow4" name="&gt;10" sourceRef="decide" targetRef="scripttask2">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${num > 10}]]></conditionExpression>
</sequenceFlow>
<userTask id="usertask1" name="Enter any number" activiti:assignee="${initiator}" activiti:candidateGroups="managers">
<extensionElements>
<activiti:formProperty id="num" name="num" type="long" required="true"></activiti:formProperty>
</extensionElements>
</userTask>
<sequenceFlow id="flow6" sourceRef="usertask1" targetRef="decide"></sequenceFlow>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow7" sourceRef="scripttask2" targetRef="endevent1"></sequenceFlow>
<sequenceFlow id="flow8" sourceRef="scripttask3" targetRef="endevent1"></sequenceFlow>
<sequenceFlow id="flow9" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
</process>

How it works internally ?? Cn anyone help me to understand this?

Outcomes