Terminate long running process instances - camunda 8

I am looking to terminate process instances after 24 hours in camunda 8. I’ve found the solution for camunda 7 https://forum.camunda.io/t/terminate-long-running-process-instances/9251. However, in Camunda 8 this results in the following error:

  • ERROR: Interrupting timer event with time cycle is not allowed.

I’ve attached a workaround I found, but since this is not the cleanest solution, is there still a way to do it like in Camunda 7? The alternative would be a boundary event on every task, but that’s not preferred.

Any suggestions are welcome, thanks!

I’m not 100% sure that this would work in C8, but the system appears to be complaining because you put a cycle in the timer definition (eg. PT24H) , rather than the solution being invalid

Can you post your example BPMN?

I think the solution would be to use a script task to set the “Force end of process” date as a variable, then set the boundary timer to have the value of that date as the timer execution date.

Alternatively, you could use the interrupting event subprocess as described in the thread you linked.


Thank you for your suggestions! I will try them out.
For reference please see the model and corresponding error message below:

Indeed, it seems to be due to cycle time.

For the interrupting timer event subprocess, you could use a date instead. Currently, the timer start event doesn’t support a duration or a cycle.

You could calculate a date in 24 hours by using the following expression:

= now() + duration("P1D")

Hi Phillipp,

Exactly what I was looking for, thank you! I will mark it as the solution.