What I do: 1. Launch process 2. runtimeService.signalEventReceived("launchCandidateSubprocessSignal") 3. End Process
Problem: When I start the process first time - all works fine. But if I start it the second time - it launch TWO subprocess, the third - THREE subprocess, and so on.
Bad way to resolve it: I noticed that if to clear ACT_RU_EVENT_SUBSCR table each time, all works fine.
Question: 1. How to correctly populate signals? 2. Does it acceptable to clear the ACT_RU_EVENT_SUBSCR table on main process start
The signal event broadcasts the event to every running process instance with that signal name, so it's clear that this is expected behavior. If you don't want this behavior you could add a specific execution id to your signalEventReceived method call