cancel
Showing results for 
Search instead for 
Did you mean: 

Different order of execution of the tasks: activiti bug?

udoderk
Champ in-the-making
Champ in-the-making
Hi all,
I model the following business process. This business process includes the following steps:
1 - "Start" User Task.
2 - "Make decision" User Task: the user specifies whether "yes" path or "No" path must be chosen.
3 - If "Yes" path is selected, then is "Bugfix" User Task runs.

4 - Whether "Yes" or "No" is selected, "Checkpoint" User Task must be allways running.
5 - "End" User Task must be running.

I have tried to model this process firstly without the inclusive gateway. If  inclusive gateway would be used, so it would be look like the diagram as follows:

[img]http://img267.imageshack.us/img267/8277/myprocessyesnoyesandnoi.png[/img]


Note, the generation of BPMN20 XML for Activiti 5.10 is based on the existing data from another application. This another application is used to model business process too.

My problem is that i have for same business process two generation-cases and a different order of execution of the tasks in Activiti Explorer depending on how I design the business process in another application.

Therefore, I would like to know the rules by which the order is the flow of tasks defined.

Details:

If i use the following xml, and select "No" checkbox within "Make decision" user task ,  so the "Checkpoint" user task with number 4 occurs before of the user task "Bugfix" number 3 (not correct !):
 


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="adhoc">
<process id="process_438" isExecutable="true" name="TestYesNo_YesAndNo">
<documentation id="process_doc_438">created at: Fri Jan 11 14:30:15 CET 2013</documentation>
<userTask id="ut_1_" name="1 Start (A)">
<extensionElements />
<potentialOwner id="IDPRFX_po_565">
<resourceAssignmentExpression id="IDPRFX_po_rae_565">
<formalExpression id="IDPRFX_po_rae_fe_565">management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
<humanPerformer id="IDPRFX_hp_565">
<resourceAssignmentExpression id="IDPRFX_hp_rae_565">
<formalExpression id="IDPRFX_hp_rae_fe_565">${initiator}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<userTask id="ut_2_" name="2 OK? (A)">
<extensionElements>
<activiti:formProperty id="yes_path_566" variable="yes_path_VAR" name="Yes" value="true" required="false" type="boolean" />
<activiti:formProperty id="no_path_566" variable="no_path_VAR" name="No" value="true" required="false" type="boolean" />
</extensionElements>
<potentialOwner id="IDPRFX_po_566">
<resourceAssignmentExpression id="IDPRFX_po_rae_566">
<formalExpression id="IDPRFX_po_rae_fe_566">management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
<humanPerformer id="IDPRFX_hp_566">
<resourceAssignmentExpression id="IDPRFX_hp_rae_566">
<formalExpression id="IDPRFX_hp_rae_fe_566">${initiator}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<userTask id="ut_3_" name="3 Bugfix (D)">
<extensionElements />
<potentialOwner id="IDPRFX_po_569">
<resourceAssignmentExpression id="IDPRFX_po_rae_569">
<formalExpression id="IDPRFX_po_rae_fe_569">management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
<humanPerformer id="IDPRFX_hp_569">
<resourceAssignmentExpression id="IDPRFX_hp_rae_569">
<formalExpression id="IDPRFX_hp_rae_fe_569">${initiator}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<userTask id="ut_4_" name="4 Checkpoint (B)">
<extensionElements />
<potentialOwner id="IDPRFX_po_568">
<resourceAssignmentExpression id="IDPRFX_po_rae_568">
<formalExpression id="IDPRFX_po_rae_fe_568">management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
<humanPerformer id="IDPRFX_hp_568">
<resourceAssignmentExpression id="IDPRFX_hp_rae_568">
<formalExpression id="IDPRFX_hp_rae_fe_568">${initiator}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<userTask id="ut_5_" name="5 End (A)">
<extensionElements />
<potentialOwner id="IDPRFX_po_567">
<resourceAssignmentExpression id="IDPRFX_po_rae_567">
<formalExpression id="IDPRFX_po_rae_fe_567">management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
<humanPerformer id="IDPRFX_hp_567">
<resourceAssignmentExpression id="IDPRFX_hp_rae_567">
<formalExpression id="IDPRFX_hp_rae_fe_567">${initiator}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id="vid_451" sourceRef="ut_1_" targetRef="ut_2_" />
<sequenceFlow id="vid_453" sourceRef="ut_2_" targetRef="ut_5_">
<conditionExpression xsi:type="tFormalExpression">${yes_path_VAR == 'true'}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="vid_454" sourceRef="ut_2_" targetRef="ut_4_">
<conditionExpression xsi:type="tFormalExpression">${yes_path_VAR == 'true' || no_path_VAR == 'true' }</conditionExpression>
</sequenceFlow>
<sequenceFlow id="vid_456" sourceRef="ut_4_" targetRef="ut_5_" />
<sequenceFlow id="vid_461" sourceRef="ut_3_" targetRef="ut_5_" />
<sequenceFlow id="vid_462" sourceRef="ut_2_" targetRef="ut_3_">
<conditionExpression xsi:type="tFormalExpression">${no_path_VAR == 'true'}</conditionExpression>
</sequenceFlow>
<startEvent id="theStart" activiti:initiator="initiator" />
<sequenceFlow id="fromStart" sourceRef="theStart" targetRef="ut_1_" />
<endEvent id="theEnd_567" />
<sequenceFlow id="toEnd_567" sourceRef="ut_5_" targetRef="theEnd_567" />
</process>
</definitions>



If i use the following xml, and select "No" checkbox within "Make decision" user task , so the "Checkpoint" user task with number 4 occurs after of the user task "Bugfix" number 3 (correct 😞

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="adhoc">
<process id="process_463" isExecutable="true" name="TestYesNoYesAndNo2">
<documentation id="process_doc_463">created at: Fri Jan 11 14:35:15 CET 2013</documentation>
<userTask id="ut_1_" name="1 Start (A)">
<extensionElements />
<potentialOwner id="IDPRFX_po_590">
<resourceAssignmentExpression id="IDPRFX_po_rae_590">
<formalExpression id="IDPRFX_po_rae_fe_590">management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
<humanPerformer id="IDPRFX_hp_590">
<resourceAssignmentExpression id="IDPRFX_hp_rae_590">
<formalExpression id="IDPRFX_hp_rae_fe_590">${initiator}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<userTask id="ut_2_" name="2 OK? (A)">
<extensionElements>
<activiti:formProperty id="yes_path_591" variable="yes_path_VAR" name="Yes" value="true" required="false" type="boolean" />
<activiti:formProperty id="no_path_591" variable="no_path_VAR" name="No" value="true" required="false" type="boolean" />
</extensionElements>
<potentialOwner id="IDPRFX_po_591">
<resourceAssignmentExpression id="IDPRFX_po_rae_591">
<formalExpression id="IDPRFX_po_rae_fe_591">management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
<humanPerformer id="IDPRFX_hp_591">
<resourceAssignmentExpression id="IDPRFX_hp_rae_591">
<formalExpression id="IDPRFX_hp_rae_fe_591">${initiator}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<userTask id="ut_3_" name="3 Bugfix (D)">
<extensionElements />
<potentialOwner id="IDPRFX_po_592">
<resourceAssignmentExpression id="IDPRFX_po_rae_592">
<formalExpression id="IDPRFX_po_rae_fe_592">management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
<humanPerformer id="IDPRFX_hp_592">
<resourceAssignmentExpression id="IDPRFX_hp_rae_592">
<formalExpression id="IDPRFX_hp_rae_fe_592">${initiator}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<userTask id="ut_4_" name="4 Checkpoint (B)">
<extensionElements />
<potentialOwner id="IDPRFX_po_593">
<resourceAssignmentExpression id="IDPRFX_po_rae_593">
<formalExpression id="IDPRFX_po_rae_fe_593">management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
<humanPerformer id="IDPRFX_hp_593">
<resourceAssignmentExpression id="IDPRFX_hp_rae_593">
<formalExpression id="IDPRFX_hp_rae_fe_593">${initiator}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<userTask id="ut_5_" name="5 End (A)">
<extensionElements />
<potentialOwner id="IDPRFX_po_594">
<resourceAssignmentExpression id="IDPRFX_po_rae_594">
<formalExpression id="IDPRFX_po_rae_fe_594">management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
<humanPerformer id="IDPRFX_hp_594">
<resourceAssignmentExpression id="IDPRFX_hp_rae_594">
<formalExpression id="IDPRFX_hp_rae_fe_594">${initiator}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id="vid_478" sourceRef="ut_2_" targetRef="ut_3_">
<conditionExpression xsi:type="tFormalExpression">${no_path_VAR == 'true'}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="vid_479" sourceRef="ut_2_" targetRef="ut_5_">
<conditionExpression xsi:type="tFormalExpression">${yes_path_VAR == 'true'}</conditionExpression>
</sequenceFlow>
<sequenceFlow id="vid_480" sourceRef="ut_2_" targetRef="ut_4_">
<conditionExpression xsi:type="tFormalExpression">${yes_path_VAR == 'true' || no_path_VAR == 'true' }</conditionExpression>
</sequenceFlow>
<sequenceFlow id="vid_481" sourceRef="ut_1_" targetRef="ut_2_" />
<sequenceFlow id="vid_482" sourceRef="ut_4_" targetRef="ut_5_" />
<sequenceFlow id="vid_483" sourceRef="ut_3_" targetRef="ut_5_" />
<startEvent id="theStart" activiti:initiator="initiator" />
<sequenceFlow id="fromStart" sourceRef="theStart" targetRef="ut_1_" />
<endEvent id="theEnd_594" />
<sequenceFlow id="toEnd_594" sourceRef="ut_5_" targetRef="theEnd_594" />
</process>
</definitions>



I thank you for the some ideas and help!
13 REPLIES 13

udoderk
Champ in-the-making
Champ in-the-making
how do you get the image in there? I tried everything….
i use just the "img" tag. Before i have retrieved the image url using firefox context menu entry.

I do not understand the 'shift to bottom'
The "Checkpint" is to be moved to bottom corner to other (virtual) swinlane on your image. But it is absolutely not important.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
how do you get the image in there? I tried everything….
i use just the "img" tag. Before i have retrieved the image url using firefox context menu entry.

I used that to… did not work for me… Weird… Did you do [img=url][/img] or with quotes around the url or the url between the tags or…

PLEAAAASSSEEE 😉

udoderk
Champ in-the-making
Champ in-the-making
how do you get the image in there? I tried everything….
i use just the "img" tag. Before i have retrieved the image url using firefox context menu entry.

I used that to… did not work for me… Weird… Did you do [img=url][/img] or with quotes around the url or the url between the tags or…

PLEAAAASSSEEE 😉

i use it just with image tag: [_img_]imageurl[_/img_]
In example "_" is quasi escape operator;-)

[img]http://kukeltje.files.wordpress.com/2013/01/selectie_002.png?w=648[/img]

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Weeeeeiiirrd… I'm sure I tried this first and several times and it did not work. Now it does…. Weird…