cancel
Showing results for 
Search instead for 
Did you mean: 

the Activiti boundarytimer didn't work when added two or more

karedom
Champ in-the-making
Champ in-the-making

Hi,

 i have encounted a problem.Can some friends help me?

i have tried that the  process can   move into next userTask automically when overtime if  a  userTask is added a boundarytimer .but if i added  a boundarytimer to the second userTask,the timer on the second userTask didn't work  at all,and it didn't wait for a certain time by setted.i have checked  the activiti data base,and found that the second userTask was deleted  at the same time as soon as the first userTask  was deleted .

Why?

My purpose is to implement  moving into the next userTask automically when the current userTask is overtime in every userTask .

How to implement it in activiti?

ps: The diagram and parameters setted as below:

1 ACCEPTED ANSWER

cjose
Elite Collaborator
Elite Collaborator

Your xml looks perfectly valid and I just imported it to my engine running on 5.22 and it works just fine. As you can see below, all three tasks got completed using the boundary timer which got fired in 2 minutes (as per your config)

Wondering if the issue is one of the bugs fixed in one of the newer versions..Any particular reason why you still running on 5.14? May be it is time to plan an upgrade either to one of the newer versions of 5.X or even to 6.X!

Ciju

View answer in original post

5 REPLIES 5

cjose
Elite Collaborator
Elite Collaborator

Please attach a bpmn xml instead of an image to check this out on our end. Another option is to provide a unit test..

Image in this case will not help us to understand/see the configuration in your bpmn diagram

karedom
Champ in-the-making
Champ in-the-making

Thanks for your reply!Here attach bpmn xml:

<?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" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
<process id="performance_claim_personalFina_flow" name="performance_claim_personalFina_flow" isExecutable="true">
<userTask id="performance_claim_vote" name="userTask1"></userTask>
<userTask id="performance_claim_belongNet_approve" name="userTask2"></userTask>
<userTask id="performance_claim_belongBranch_approve" name="userTask3"></userTask>
<endEvent id="endevent_success_1" name="endevent_success_1"></endEvent>
<sequenceFlow id="flow51" sourceRef="performance_claim_belongBranch_approve" targetRef="endevent_success_1"></sequenceFlow>
<startEvent id="startevent1" name="startevent1"></startEvent>
<sequenceFlow id="flow61" sourceRef="startevent1" targetRef="performance_claim_vote"></sequenceFlow>
<sequenceFlow id="flow91" sourceRef="performance_claim_vote" targetRef="performance_claim_belongNet_approve"></sequenceFlow>
<sequenceFlow id="flow92" sourceRef="performance_claim_belongNet_approve" targetRef="performance_claim_belongBranch_approve"></sequenceFlow>
<boundaryEvent id="boundarytimer1" name="Timer" attachedToRef="performance_claim_vote" cancelActivity="true">
<timerEventDefinition>
<timeDuration>PT2M</timeDuration>
</timerEventDefinition>
</boundaryEvent>
<sequenceFlow id="flow93" name="overtime" sourceRef="boundarytimer1" targetRef="performance_claim_belongNet_approve"></sequenceFlow>
<boundaryEvent id="boundarytimer2" name="Timer" attachedToRef="performance_claim_belongNet_approve" cancelActivity="true">
<timerEventDefinition>
<timeDuration>PT2M</timeDuration>
</timerEventDefinition>
</boundaryEvent>
<sequenceFlow id="flow96" name="overtime" sourceRef="boundarytimer2" targetRef="performance_claim_belongBranch_approve"></sequenceFlow>
<boundaryEvent id="boundarytimer3" name="Timer" attachedToRef="performance_claim_belongBranch_approve" cancelActivity="true">
<timerEventDefinition>
<timeDuration>PT2M</timeDuration>
</timerEventDefinition>
</boundaryEvent>
<sequenceFlow id="flow97" name="overtime" sourceRef="boundarytimer3" targetRef="endevent_success_1"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_performance_claim_personalFina_flow">
<bpmndi:BPMNPlane bpmnElement="performance_claim_personalFina_flow" id="BPMNPlane_performance_claim_personalFina_flow">
<bpmndi:BPMNShape bpmnElement="performance_claim_vote" id="BPMNShape_performance_claim_vote">
<omgdc:Bounds height="55.0" width="105.0" x="300.0" y="181.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="boundarytimer1" id="BPMNShape_boundarytimer1">
<omgdc:Bounds height="30.0" width="30.0" x="310.0" y="221.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="performance_claim_belongNet_approve" id="BPMNShape_performance_claim_belongNet_approve">
<omgdc:Bounds height="57.0" width="131.0" x="500.0" y="180.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="boundarytimer2" id="BPMNShape_boundarytimer2">
<omgdc:Bounds height="30.0" width="30.0" x="590.0" y="220.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="performance_claim_belongBranch_approve" id="BPMNShape_performance_claim_belongBranch_approve">
<omgdc:Bounds height="66.0" width="128.0" x="790.0" y="176.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="boundarytimer3" id="BPMNShape_boundarytimer3">
<omgdc:Bounds height="30.0" width="30.0" x="890.0" y="216.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent_success_1" id="BPMNShape_endevent_success_1">
<omgdc:Bounds height="35.0" width="35.0" x="1000.0" y="191.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35.0" width="35.0" x="200.0" y="191.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow51" id="BPMNEdge_flow51">
<omgdi:waypoint x="918.0" y="209.0"></omgdi:waypoint>
<omgdi:waypoint x="1000.0" y="208.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow61" id="BPMNEdge_flow61">
<omgdi:waypoint x="235.0" y="208.0"></omgdi:waypoint>
<omgdi:waypoint x="300.0" y="208.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow91" id="BPMNEdge_flow91">
<omgdi:waypoint x="405.0" y="208.0"></omgdi:waypoint>
<omgdi:waypoint x="500.0" y="208.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow92" id="BPMNEdge_flow92">
<omgdi:waypoint x="631.0" y="208.0"></omgdi:waypoint>
<omgdi:waypoint x="790.0" y="209.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow93" id="BPMNEdge_flow93">
<omgdi:waypoint x="325.0" y="251.0"></omgdi:waypoint>
<omgdi:waypoint x="327.0" y="313.0"></omgdi:waypoint>
<omgdi:waypoint x="450.0" y="313.0"></omgdi:waypoint>
<omgdi:waypoint x="564.0" y="313.0"></omgdi:waypoint>
<omgdi:waypoint x="565.0" y="237.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14.0" width="41.0" x="325.0" y="251.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow96" id="BPMNEdge_flow96">
<omgdi:waypoint x="605.0" y="250.0"></omgdi:waypoint>
<omgdi:waypoint x="604.0" y="308.0"></omgdi:waypoint>
<omgdi:waypoint x="853.0" y="308.0"></omgdi:waypoint>
<omgdi:waypoint x="854.0" y="242.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14.0" width="41.0" x="605.0" y="250.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow97" id="BPMNEdge_flow97">
<omgdi:waypoint x="905.0" y="246.0"></omgdi:waypoint>
<omgdi:waypoint x="904.0" y="309.0"></omgdi:waypoint>
<omgdi:waypoint x="1018.0" y="309.0"></omgdi:waypoint>
<omgdi:waypoint x="1017.0" y="226.0"></omgdi:waypoint>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="14.0" width="41.0" x="905.0" y="246.0"></omgdc:Bounds>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>

Your help was greatly appreciated!

karedom
Champ in-the-making
Champ in-the-making

And the activiti version is 5.14,data base is DB2

cjose
Elite Collaborator
Elite Collaborator

Your xml looks perfectly valid and I just imported it to my engine running on 5.22 and it works just fine. As you can see below, all three tasks got completed using the boundary timer which got fired in 2 minutes (as per your config)

Wondering if the issue is one of the bugs fixed in one of the newer versions..Any particular reason why you still running on 5.14? May be it is time to plan an upgrade either to one of the newer versions of 5.X or even to 6.X!

Ciju