Got the below bpmn workflow running. It splits and await for message from external service (Failed or Complete), and should cancel the one that does not get triggered. (for simplicity the below diagram only models the “failed” scenario).
Starting the workflow and sending the “Failed” message it cancels the “Complete” task and all others except the Conditional Event still in “running” (see the other picture). Any tips on what might be wrong?
You could use a nice subprocess and terminate event combo to create a situation where whichever one finishes first it’ll kill the other token in the subprocess and the top-level process will continue as normal
That works fine but for some reason my tool then shows the status of the workflow as “terminated” and not completed, but that might be a bug in the tool…
Btw, see I managed to send the wrong picture of the result in my original workflow…this nearly works…but yes, guess it´s invalid in a way…
Using your model I start the sub process with two parallell Receive Tasks awaiting messages “Failed” or “Completed”. When one of these messages received by the active workflow I expect the workflow to continue and I will in the main thread check the result based on variables set in the sub process (set by a simple script tasks) and handle the process further. Sending it to a normal end event if Completed and to an error end event if Failed…