What Happens When You Rethrow Faults

Using Fault Handling in a BPEL Process 11-29

11.10 Using a Scope Activity to Manage a Group of Activities

A scope activity provides a container and a context for other activities. A scope provides handlers for faults, events, compensation, data variables, and correlation sets. Using a scope activity simplifies a BPEL flow by grouping functional structures. This grouping enables you to collapse them into what appears to be a single element in Oracle BPEL Designer. Example 11–23 shows a scope named Scope_FulfillOrder from the WebLogic Fusion Order Demo application. This scope invokes the FulfillOrder Oracle Mediator component, which determines the shipping method for the order. Example 11–23 Scope Activity scope name=Scope_FulfillOrder variables variable name=lFulfillOrder_InputVariable messageType=ns17:requestMessage variables sequence assign name=Assign_OrderData copy from variable=gOrderInfoVariable query=ns4:orderInfoVOSDO to variable=lFulfillOrder_InputVariable part=request query=ns4:orderInfoVOSDO copy assign invoke name=Invoke_FulfillOrder inputVariable=lFulfillOrder_InputVariable partnerLink=FulfillOrder.FulfillOrder portType=ns17:execute_ptt operation=execute sequence scope

11.10.1 How to Create a Scope Activity

To create a scope activity: 1. In the Component Palette, expand BPEL Constructs. 2. Drag a Scope activity into the designer. 3. Open the scope activity by double-clicking it or by single-clicking the Expand icon. 4. From the Component Palette, drag and define activities to build the functionality within the scope. Figure 11–6 provides details. 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.