Reputation: 21
I create a workflow in which i am using timer i.e. i want to use timer in a user task. It means that if a user does not perform his task in the specified time then the task got clear from his pending task list and the token move to the specified node in the workflow. My bmpn.xml file is:
<process id="newprocess6" isExecutable="true">
<startEvent id="start" name="Start Consulting" activiti:initiator="initiator">
<extensionElements>
<activiti:formProperty id="hname" name="Hospital Name" type="string"> </activiti:formProperty>
<activiti:formProperty id="dname" name="Doctor Name" type="string"> </activiti:formProperty>
</extensionElements>
</startEvent>
<userTask id="usertask1" name="Start Consulting with seema" activiti:assignee="seema">
<extensionElements>
<activiti:formProperty id="consult" name="consult" type="enum">
<activiti:value id="true" name="true"></activiti:value>
<activiti:value id="false" name="false"></activiti:value> </activiti:formProperty>
</extensionElements>
</userTask>
<endEvent id="end1"></endEvent>
<boundaryEvent id="timer2" attachedToRef="usertask1" cancelActivity="true">
<timerEventDefinition>
<timeDuration>PT2M</timeDuration>
</timerEventDefinition>
</boundaryEvent>
<userTask id="usertask2" name="Start Consulting with saurabh" activiti:assignee="saurabh">
<extensionElements>
<activiti:formProperty id="consult" name="consult" type="enum">
<activiti:value id="true" name="true"></activiti:value>
<activiti:value id="false" name="false"></activiti:value>
</activiti:formProperty>
</extensionElements>
</userTask>
<endEvent id="end2"></endEvent>
<sequenceFlow id="flow1" sourceRef="start" targetRef="usertask1"></sequenceFlow>
<sequenceFlow id="flow2" sourceRef="usertask1" targetRef="end1"></sequenceFlow>
<sequenceFlow id="flow4" sourceRef="usertask2" targetRef="end2"></sequenceFlow>
<sequenceFlow id="flow3" sourceRef="timer2" targetRef="usertask2"></sequenceFlow>
</process>
according to my knowledge, If user seema is not completing her task within 2 minutes then the task will clear from seema's pending task list and should be move to user saurabh's pending task list. But the task is not moving to saurabh's pending task list. Please help me. Thanks in advance.
Upvotes: 1
Views: 4817
Reputation: 1599
Have a look in the Activiti documentation: http://www.activiti.org/userguide/#timerEventDefinitions
timeDuration. To specify how long the timer should run before it is fired, a timeDuration can be specified as sub-element of timerEventDefinition. The format used is the ISO 8601 format (as required by the BPMN 2.0 specification). Example (interval lasting 10 days): P10D
As soon as your User Task has started, this specified time duration gets executed. When this time is over, your timer boundary event gets fired and you can move to the next User Task
Upvotes: 2