Compensation inside process

the compensation is not working as I am expecting in my process, maybe someone can tell me why.

My external task “Absage senden” is running and waiting to do something for compensation.
The token of the process instance is on task “Pensum umsetzen”.
Then I send the interrupting messageevent “löschen”.
This should end the task and should throw the compensation event.

So I expected that the token would come to my external Task “Absage senden” which is associated with my compensation boundary event on “Pensum umsetzen”.

Instead it seems that the process is just finished without doing the compensation.

+) is there something wrong in my understanding of how compensation works
+) in the modeler there is the possibility to define an activity reference on the throwing event.
What does this mean and what happens if I define a reference or not. As I understood, throwing a compensation event will trigger all existing compensation boundary events of already completed tasks.
Or is this a possibility to execute just one specific compensation event ?


Hi @tpelzer

I think the misunderstanding comes form the idea the compensation task will only ever run against tasks that have been successfully completed - if you interrupt the task with a message boundary event the engine considers the task to be canceled not completed. So compensation will ignore it.

1 Like

thanks - so the behaviour is clear.
But can you also explain me the idea of the “activity reference” inside the throwing event ?

If the Activity Ref is set just the Compensation handler of this single activity is executed.

1 Like