Closed Silvernitro closed 3 years ago
I believe it is standard notation to follow the end on the same join node before pointing towards the "end" node regardless of program flow since they are parallel paths executed simultaneously.
However, there are cases where a program might execute multiple parallel operations but only waits for the first path to complete before returning, e.g. Javascript's
Promise.any()
. In such a case, can we simply bypass the join?
This kind of complex behaviors do exist but they are not suitable to be modelled using the activity diagram's definition of parallel paths (i.e., within the scope of the notations we have covered in the module).
Got it, thanks prof! (and thanks @GeNiaaz for the quick reply too :D)
Hi prof,
According to the textbook's section on activity diagrams, the execution of a program can only continue after all parallel paths have completed:
However, there are cases where a program might execute multiple parallel operations but only waits for the first path to complete before returning, e.g. Javascript's
Promise.any()
. In such a case, can we simply bypass the join?This is actually related to Week 9 Quiz 1 Q20. I was under the impression that the activity diagram was literally trying to say: "execute P1, P2, and P3 in parallel. If P3 is complete, simply exit the program without waiting for P1 and P2.", which is a legitimate flow for a program.