Hello,
I use some signal start events in my bpmn files and I use signalEventReceived to start the definitions that have them. I receive a rabbit message and the listener calls the signalEventReceived method. However, if a process definition fails to start, all other definitions fails too as they are in the same transaction. I don’t want this behavior.
What’s the appropriate way to handle this? By using event registry?
I tried using async=true on start event but it seems that the definitions that fail to start aren’t cancelled or something, they are like zombie.
One last thing is that I want to set some process variables on the beginning of the process instance, so I guess I can’t use signalEventReceivedAsync.
Hey @desp.kaz,
They are not zombie, you should have a dead letter job for those. You are saying that they are not cancelled, but why should they?
Currently, we do not expose setting variables when triggering an event like that.
May I ask you why don’t you use our Event Registry? You don’t even need a custom listener for this. We have out-of-the-box support for Rabbit channels.
Cheers,
Filip
Yes, you’re right about the cancelled ones, this was just an assumption from my side.
If the event registry is a better fit for these cases, I will change it. I just thought that this was a simple case that we could handle just with a rabbit listener and didn’t notice at the time that this meant that the start is done in one transaction affecting other definitions to start.
With the event registry you have the possibility to use correlation parameters. So in theory you can have the same event coming in, but then different processes handling it.
e.g. Let’s say you have an customer order coming in with a specific type. If you make this type a correlation parameter, then in your process you can configure it in such a way that the process would only be started if the correlation matches.