Synchronisation challenge in a flow


Hi Ingo,
The purpose of the dwell is to manage the case when two messages arrive at exactly the same time. Without the dwell, one message will be processed and the other will throw an optimistic locking exception and thus should be retried. By the time the retry occurs, the process will have moved on and thus even though both meals were prepared at the same time, the behaviour will be as if one was prepared after the other. The small dwell enables the concurrency…

I modelled your process as a temporal state machine and thus why I took the event driven path…





it’s been a while.
I think I finally found a proper solution for the scenario. Maybe it’s useful for others.
Any doubts?