How to pause/resume a timer

Hi, I’m experimenting with having a flow interrupted and paused. To do this successfully, I need to pause a timer.

In the attached flow, you can see I have a main flow and I want to be able to send a notification to pause an instance. The instance can then be cancelled, or resumed.

A good real world example is a parking PCN. You are issued a PCN and the clock starts. If you pay within 14 days the you pay a 50% fee. If you make an appeal within that time frame your 50% is held until after the appeal has been settled. And so the timer is paused, whilst a decision is pending.

So far, I have tried experimenting with passing a time variable for completion of Thing1 as it heads into the timer, and passing the time value for when the pause message is sent. However, I can’t exactly control the loop in the timer, that I’m aware of… otherwise I would if paused stop counting, and when it’s re-set to true, carry on…

Any help or thoughts on how to do this would be excellent.

Hi @chrisaddams,

first, welcome to the Zeebe community :tada:

That is an interesting question. As far as I understand, you want to pause and resume only the timer event, correct?

There is no command to change, pause, or resume the timer. You need to model this behavior in your workflow. For example, by using an event-based gateway with the timer and a message event. The message is published when the timer should be paused. To resume, you can continue with the next task or loopback and continue waiting.

Does this help you?

This topic is also related to the other one here: Is it possible to control the workflow from bakend - #6 by Tauqeer - Workflow Execution - Camunda Cloud, powered by the Zeebe Engine

Best regards,

1 Like