Skip to main content

<compensate>

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

Syntax

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

Attributes and Elements

target attribute

Required. The name of a <compensationhandler> that provides a sequence of activities to undo previous actions.

Specify a string of up to 255 characters.

Description

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 Handling Errors in BPL.

FeedbackOpens in a new tab