End the workflow process instance after compensation is thrown

Hi ,

Below is the sample workflow where i need to run Task B and Task C in parallel and if any one of them fail i need to catch the Exception and throw a Compensation on Task A and end the Process instance without executing the Task D.
I used inclusive gateway in order to proceed to task D only when both Task B and C are successful.

To simulate this, I am manually throwing an Exception in Task B and it is being caught by the error boundary event and Comepnsation A was also executed , but the process did not terminate there and Task D was also executed. How do I not make workflow reach Task D?

Thats not how an inclusive gateway works - you can just use a merging parallel gateway

A standard end event consumes a token, it doesn’t actually end the process unless it’s the last token in the process. You need to use a terminate event instead.


1 Like

Thanks @Niall