Using the Scope Step

The Scope step includes a FaultHandler section and a CompensationHandler section. The FaultHandler is for handling Web service (SOAP) faults. By default, it has a CatchAll branch, which also catches faults generated by the BPEL engine. You can also add other Catch branches. Each Catch branch can handle a specific named Web service fault.

You can optionally add a Throw step to the FaultHandler section and a Compensation step to the CompensationHandler section. The Throw step is explained in Using the Throw Step, and the CompensationHandler is covered in Using the Compensate Step.

Procedure Summary

  1. In App Explorer, select an orchestration workflow to display it in the orchestration workflow editor.

  2. In the New Items section of the Step Palette, drag a Scope step onto the orchestration workflow editor, and drop it onto the line between the Start and End steps.

    You can change the name of the Scope step in the Property Editor, and you can also add a description.

  3. In the Step Palette, drag a Service step associated with a Web service onto the orchestration workflow editor, and drop it into the Scope section.

  4. If the Web service returns named faults, you can perform the following steps to handle them:

    1. Expand the FaultHandler section.

    2. Add and configure Catch branches one at a time, or automatically add and configure all Catch branches for a Web service operation.

      • To add Catch branches one at a time:
        1. Right-click the Fault Handler step, and then select Insert New Catch.

          A new Catch branch appears above the CatchAll branch.

        2. Select the new Catch branch.
        3. On the General tab of the Property Editor, specify a Web service fault by selecting it from the Fault name list. You can also change the name of the Catch branch and provide a description.

          Note: If there is an associated fault message, it is displayed in the Fault message box as read-only. If there is no message, the Fault message box is empty. See Rules for Configuring the Catch Branch for more information.
        4. In the Step Palette, you can drag any steps that you want to use to handle the fault into the Scope section and drop them onto the Catch branch. Then configure the steps as required.
        5. Repeat these steps to add and configure other Catch branches.
      • To automatically add all Catch branches associated with a Web service operation:
        1. In the top section of the Scope step, right-click the Service step, and then select Add Catch Branches to Scope.

          Catch branches are automatically added to the FaultHandler section.

        2. In the Step Palette, you can drag any steps that you want to use to handle the faults into the Scope section and drop them onto a Catch branch. Then configure the steps as required.
    3. To handle faults that are not handled by the Catch branches, you can drag any steps that you want to use to handle these faults into the Scope section and drop them onto the CatchAll branch. Then configure the steps as required.

      You cannot specify a fault name and a fault message for the CatchAll branch, because it is invoked if none of the other branches can handle the fault.

  5. If the Web service does not return named faults, perform the following steps to handle the faults returned by the Web service:

    1. Expand the FaultHandler section.
    2. In the Step Palette, you can drag any steps that you want use to handle the faults into the Scope section and drop them onto the CatchAll branch. Then configure the steps as required.
Note: To hide the sections of the Scope step as you work on another part of the orchestration workflow, click the minus sign to the left of the Scope step.

Related Topics

Using the Throw Step

Using the Compensate Step