In the process illustrated, if the XOR gateway goes into its “else” branch, there is no point for tasks 2 A and B to continue.
Can this be drawn more elegant than what I’ve done here?
I know about the compensation event, but in this example there is no need for “undo”, just stop.
Well, I've seen the description without seeing the diagram first and that was exactly the solution that I came up with in my mind.
I don't see how could you draw that better.
Note, in detailed requirement it should be clear that the thrown event is limited to the scope of the current process (so in implementation it should have the process' id). Otherwise you will be throwing an event in one process and other process could catch it and react upon it.
One more thing. If you have more complex logic (instead of just task 2 a
and task 2 b
) you may want to encapsulate that entire logic in one larger task and have only a single interrupting event on this higher level task rather than creating one for every subtask.