A scope's activities can be compensated, or reversed when the scope is completed and when another activity causes compensation to begin.
To add a compensation handler to a scope:
From the Process Editor canvas, select a scope.
Drag a Compensation catch event into the scope or near the border of a collapsed scope, as the illustration shows.
Drag activities into the compensation handler that will reverse the work of the scope's main activity. For a boundary event, you must link the handler to an activity to execute. The activity must be a downstream activity that has not yet executed.
From another scope, create an activity that triggers the compensation handler for the completed scope.
The following illustration shows a parent scope, children scopes, and their compensation handlers.