Postponing/Hastening Boundary Timer Events

Hi,

We have a use case where we would like to postpone/hasten all the boundary timer events attached to a user task instance.

Is it possible to achieve this by using public Flowable APIs? What would be a recommended way for that?

Thank you!

Best,
Vasil

Hi Vasil,

You could suspend the process instance. This will postpone all the timer events as well.

Best regards,

Tijs

Hi Tijs,

thank you for your reply!

Our use case is going into a bit different direction though. Let’s imagine the following situation. There is a task with 2 boundary timer events attached to it which are supposed to fire in, let’s say, 2 hours and in 3 hours respectively. We want to be able to hasten them by, let’s say, one hour, so, that after the alteration, they will fire in an hour and 2 hours respectively instead. We would also like to be able to postpone them. In the previous example, postponing by one day would result in the first event to fire in 1 day and 2 hours and the second - in 1 day and 3 hours.

Is that feasible?

Thank you!

Best regards,
Vasil

Hi Vasil,

May be you can re-schedule timer in the command. See org.flowable.engine.impl.cmd.JobRetryCmd#execute

Regards
Martin

1 Like

Hi Martin,

We’ll try that. The only concern for us is that we’ll have to use the “impl” classes. But looks like it’s the best way.
Thank you very much!

Best,
Vasil

Another possibility could be to delete timer and create new one.

1 Like

Is there an API for this?

There is no public API for deleting and creating timers (Timers are managed internally by engine).
But you can do anything with org.flowable.job.service.impl.persistence.entity.TimerJobEntityManager.

Martin

1 Like

Thanks Martin! Investigating.

Best,
Vasil