Call Activity but only if process instance is not running

Hi

Is there possibility to check if there is running process instance via script task?
I want to start 50+ processes that first one should start process X and rest of them only send a message with variables to that process.
I’m not used to use scripts like ex. execution.getProcessEngineServices()… is the possibility to check if process X or process with specific business Key is running.
I’ll be soo happy if somebody would share with solution to my problem.

Hi @ItsPatrick welcome to the community.

What you’ve modeled probably wont work because even after the the one process has finished it will then move the sent event where it will try to send a message to a process that has ended.

Instead i would consider you take a look at this example - it’s not 100% what you need but you can re-use most of it to do what you want.

1 Like