Click Apply, then click OK.

11-40 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite available for invocation only when the scope completes normally. Invoking a compensation handler that has not been installed is equivalent to using the empty activity it is a no-op. This ensures that fault handlers do not have to rely on state to determine which nested scopes have completed successfully. The semantics of a process in which an installed compensation handler is invoked multiple times are undefined. The ability to explicitly invoke the compensate activity is the underpinning of the application-controlled error-handling framework of Business Process Execution Language for Web Services Specification. You can use this activity only in the following parts of a business process: ■ In a fault handler of the scope that immediately encloses the scope for which compensation is to be performed. ■ In the compensation handler of the scope that immediately encloses the scope for which compensation is to be performed. For example: compensate scope=RecordPayment If a scope being compensated by name was nested in a loop, the BPEL process service component invokes the instances of the compensation handlers in the successive iterations in reverse order. If the compensation handler for a scope is absent, the default compensation handler invokes the compensation handlers for the immediately enclosed scopes in the reverse order of the completion of those scopes. The compensate form, in which the scope name is omitted in a compensate activity, explicitly invokes this default behavior. This is useful when an enclosing fault or compensation handler must perform additional work, such as updating variables or sending external notifications, in addition to performing default compensation for inner scopes. The compensate activity in a fault or compensation handler attached to the outer scope invokes the default order of compensation handlers for completed scopes directly nested within the outer scope. You can mix this activity with any other user-specified behavior except for the explicit invocation of the nested scope within the outer scope. Explicitly invoking compensation for such a scope nested within the outer scope disables the availability of default-order compensation.

11.12.2 How to Create a Compensate Activity

To create a compensate activity: 1. In the Component Palette, expand BPEL Constructs. 2. Drag a Compensate activity into the designer 3. Double-click the Compensate activity. 4. Select a scope activity in which to invoke the compensation handler, as shown in Figure 11–15 .