Activiti / Camunda change boundary timer with variable -
i got special question regarding timer boundary events on user task in activiti/camunda:
when starting process set timer duration process variable , use expressions in boundary definition resolve variable. boundary event defined on user task.
<bpmn2:timereventdefinition id="_timereventdefinition_11"> <bpmn2:timeduration xsi:type="bpmn2:tformalexpression">${hurry}</bpmn2:timeduration> </bpmn2:timereventdefinition>
in cases, when timer running can occur, deadline (duedate) should extended because asignee has requested more time. purpose want change value of process variable defining deadline.
as happens, variable resolved @ process-start , set boundary event.
any further changes of variable not affect duedate of boundary timer because stored in database , not updated when value of variable changes.
i know how update duedate of job element via java api, want provide generic approach setting changing value of variable.
the common use case extending deadline when boundary timer running.
any ideas how cope problem?
any tips apprechiated. cheers chris
after time of thinking came workaround that:
i start process 2 variables. "hurry" evaluated boundary timer. , "extenddeadline" initialized false
. if timer triggers , process advances exclusive gateway, value of "extenddeadline" evaluated.
if user has changed value of "extenddeadline" true
during the timer running process returns user task again boundary timer set value of "hurry".
if "extenddeadline" still set false
, process can proceed.
Comments
Post a Comment