The question is: what about a new message is received while the task “Store encrypted offer” is running? The event is lost or the engine is able to manage it when returning to the event gateway?
Any suggestion to modify the BPMN in case the message was lost?
The “gist” is: Create a Message Start Event that captures all messages, and then have script event that re-correlates the messages to their proper destination. And as you can see in the example there are error handling that can be done as well.
@ddozza: In your model, the engine will throw an exception if you try to correlate a message while the task is running. It depends on your messaging implementation in which way you would handle this.
I would suggest one small modification. There is a race condition between the auction closing and calculating a winner. Hence, Ive put the event driven sub-process in a nested scope to reduce the opportunity of the race condition…
@benhoffmann@Webcyberrob what about the event timer occurs while a store offer task is still running? The auction close event kills the subprocess or waits for completion?
What about using a boundary event like in the following example?
Auction close would not kill the store offer task but rather wait for completion (unless you make it a terminate event).
Your example works almost the same way. The only difference is that in your case store offer would not have access to any local variables of the sub process (not recommended anyway) and open offers could be executed while store offer is still running. That means there is a race condition again.