Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see How to Migrate to InterSystems IRIS, available on the WRC Distributions page (login required).


Invoke a <compensationhandler> from <catch> or <catchall>.


   <throw fault='"BuyersRegret"'/>
     <catch fault='"BuyersRegret"'>
       <compensate target="RestoreBalance"/>
     <compensationhandler name="RestoreBalance">
       <assign property='context.MyBalance' value='context.MyBalance+1'/>


Attribute or Element Description Value
target attribute Required. The name of a <compensationhandler> that provides a sequence of activities to undo previous actions. A string of 0 to 255 characters.
<annotation> element See “Common Attributes and Elements.”  


The <compensate> element invokes a <compensationhandler> block by specifying its name as a target:

<compensate target="general"/>

<compensate> may only appear within <catch> or <catchall>. Its target value must match the name of a <compensationhandler> within the same BPL business process.

For details, see “BPL Error Handling Conventions” in Developing BPL Processes.