How to enforce single process instance?

Hi, I have the following use case: I have a technical workflow that is timer based. It checks for some changes in some backend services every 30 seconds. It might now happen that this initial check takes longer than 30 seconds, hence a new timer event is triggered and would lead to a second check process instance. Now I learned in Identify process instance is in progress that I can count my process instances in an execution listener in my timer start event. I then throw a runtime exception. Now my problem is that those processes are marked as incidents in the engine, but what I want is that they aren’t even appearing, as I don’t want to clean them up. How can I avoid the creation of these incidents? Or what solution pattern would you recommend here? I’m happy to share my bpmn definitions. Best regards.

See Limit number of concurrently running instances of a process definition. Given you have a timer start event, you should have gateway after the start event that checks for active instances and if active then just complete the process.

1 Like

Nice. Thanks. So the gateway it is.