How to Return a Fault in a Synchronous Interaction How to Return a Fault in an Asynchronous Interaction

11-30 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite Figure 11–6 Expanded Scope Activity

5. Click OK.

When complete, scope activity design can look as shown in Figure 11–7 . This example shows the Scope_AuthorizeCreditCard scope activity of the Fusion Order Demo application. Figure 11–7 Scope Activity After Design Completion

11.10.2 How to Add Descriptive Notes and Images to a Scope Activity

You can add descriptive notes to scope activities that provide simple descriptions of the functionality of the scope. You can also change the graphical image of scopes. The notes and images display in Oracle BPEL Designer. This helps to make a scope easier to understand. To add descriptive notes and images to a scope activity: 1. Perform one of the following steps: ■ Right-click the scope and select User Documentation. ■ Double-click the scope and select the User Documentation tab. The Documentation dialog appears.

2. In the Comment field, enter a brief description of the functionality of the scope.

Using Fault Handling in a BPEL Process 11-31

3. In the Image field, click the Search icon to optionally change the graphical image

for the scope.

4. Click OK.

Your changes display in Oracle BPEL Designer, as shown in Figure 11–8 . Figure 11–8 Scope with Descriptive Note and Modified Image

5. To edit the note, double-click it.

11.10.3 What Happens After You Create a Scope Activity

Example 11–24 shows the scope activity in the .bpel file after design completion. The Scope_AuthorizeCreditCard scope activity consists of activities that perform the following actions: ■ A catch activity for catching faulted orders in which the credit card number is not provided or the credit type is not valid. ■ A throw activity that throws a fault for orders that are not approved. ■ An assign activity that takes the credit card type, credit card number, and purchase amount, and assigns this information to the input variable for the CreditCardAuthorizationService service. ■ An invoke activity that calls a CreditCardAuthorizationService service to retrieve customer information. ■ A switch activity that checks the results of the credit card validation. Example 11–24 Scope Activity scope name=Scope_AuthorizeCreditCard variables variable name=lCreditCardInput messageType=ns2:CreditAuthorizationRequestMessage variable name=lCreditCardOutput messageType=ns2:CreditAuthorizationResponseMessage