how would you model the following situation in BPMN?
I have a process model with two parallel paths. The two paths are then joined via a parallel join gateway (+). When both paths arrive at the join, the process is executed further.
I’d like to achieve that one path waits for the other not longer than some amount of time, e.g. 20 sec. If one path (it does not matter which) arrives at the join, and the other one does not arrive within 20 sec after that, I’d like some special action to be executed.
Here’s my first attempt, it could be a little over engineered and a more elegant solution may exist, however I believe this effects the behaviour you desire.
Thank you Rob! I assumed this should somehow use timer events and event based gateways, but could not think it to the end.
I’d have a question: shouldn’t DoA and DoB have “async after” set to “true” so that the evaluation of the variables in the rule events (“Task X complete == true?”) is done with the correct data?
Not in this case - The escalation event will only be triggered in the case where a token is waiting at the parallel join an another one is waiting at the task. Canceling both tokens and sending on onward to the rest of the process.
The other scenario is that both tasks are completed before the escalation is triggered in which case the tokes are merged and one token continues via the main flow and the escalation is never triggered.
So i don’t think this pattern could produce 2 tokens leaving the sub process.
But in this case, I read it as a non-interrupting conditional event sub-process which has not interrupted the main flow. By throwing an escalation event, I interpret this as creating a new execution. So now I get the escalation execution and the main process flow execution?
Perhaps the escalation catch boundary event interrupts the main flow?
So now your challenge is to implement a best efforts parallel join (which is what I was trying to achieve in my first attempt)…
Requirement is;
Execute two parallel tasks.
Wait for both to complete before proceeding, except if timeout t is exceeded after either task completes. In this case, proceed with the rest of the process, but do not abandon any outstanding/in progress task…
It was the do not abandon any task which led me to use a latch pattern…
One timer needs to be running for every 30 seconds until the above parallel multi instance is completed.
Can I achieve this using a parallel gateway and how to stop the timer once the first task is completed