Change duration of "Timer Boundary Event" (Camunda 8)

Could you please let me know how the change the duration of a Timer Boundary Event?

Use case:
image

There is a “User Task” with a Timer Boundary Event assigned. The duration of the timer is defined by a process instance variable (PT2M). After this timeout the instance will be terminated in this sample (1). I search a way to programatically increase the duration when the task is already initialitzed. Means during the duration of the 2M I want to change the timeout to be 5M (2).

When I execute my sampe I see that the variable in the process instance is changed but the task still times out after 2 minutes.

Is there something else needed to tell the engine to reschedule the trigger? Thanks in advance.

Hello my dear!

In camunda 7 - cockpit, we have the possibility to do this, using this screen when we access the instance in question, being able to change the timer time, or even stop the timer.

But in Camunda 8 - Operate, I have no knowledge about the same as I haven’t had the opportunity to use it yet.

I hope someone can help our friend here!

William Robert Alves

Thanks for your answer. But I search a way to do it with the Camunda 8 engine.

You can make the boundary event (2) interrupting and then re-enter the user task after you increased the expiration timeout. Like this the timer (1) is evaluated again but it is a new instance of the same user task.

There are many possibilities, you could also put the user task in a sub process and add a non-interrupting boundary timer event to the task that fires every minute or so, then after that you have a gateway to check if the timer really expired and if so you fire a escalation end event. Then you catch the escalation as boundary event on the sub process. So if the time was expired you continue at this boundary of the sub process otherwise normally.

What I think is an elegant pattern to update a timer works as follows: you first enter a event-based gateway then you put the timer and the message event (to increase the timer) right after it. Then all the message event does is changing the variable used in the timer event and goes straight back to the event-based gateway (this leads to re-evaluation of the timer).

1 Like

Thanks a lot. The solution with the event gateway works fine.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.