In the Modify Run Scenario Step wizard, click Lookup Scenario and follow the

Working with Load Plans 14-15

14.2.4 Handling Load Plan Exceptions and Restartability

Load Plans provide two features for handling error cases in the execution flows: Exceptions and Restartability. Exceptions An Exception Step contains a hierarchy of steps that is defined on the Exceptions tab of the Load Plan editor. You can associate a given exception step to one or more steps in the Load Plan. When a step in the Load Plan errors out, the associated exception step is executed automatically. Exceptions can be optionally raised to the parent step of the failing step. Raising an exception fails the parent step, which can consequently execute its exception step. Restartability When a Load Plan Run is restarted after a failure, the failed Load Plan steps are restarted depending on the Restart Type parameter. For example, you can define whether a parallel step should restart all its child steps or only those that have failed. This section contains the following topics: ■ Defining Exceptions Flows ■ Using Exception Handling ■ Defining the Restart Behavior

14.2.4.1 Defining Exceptions Flows

Exception steps are created and defined on the Exceptions tab of the Load Plan Editor. This tab contains a list of Exception Steps. Each Exception Step consists in a hierarchy of Load Plan steps. The Exceptions tab is similar to the Steps tab in the Load Plan editor. The main differences are: ■ There is no root step for the Exception Step hierarchy. Each exception step is a separate root step. ■ The Serial, Parallel, Run Scenario, and Case steps have the same properties as on the Steps tab but do not have an Exception Handling properties group. An exception step that errors out cannot raise another exception step. An Exception step can be created either by using the Add Step Wizard or with the Quick Step tool by selecting the Add Step Exception Step in the Load Plan Editor toolbar. By default, the Exception step is created with the Step name: Exception. You can modify this name in the Steps Hierarchy table or in the Property Inspector. To create an Exception step with the Add Step Wizard:

1. Open the Load Plan Editor and go to the Exceptions tab.

2. In the Load Plan Editor toolbar, select Add Step Add Step Wizard.

3. In the Add Step Wizard, select Exception from the Step Type list.

Note: Only values that are valid for the current selection are displayed for the Step Type. 14-16 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator

4. Click Next.

5. In the Step Name field, enter a name for the Exception step.

6. Click Finish.

7. The Exception step is added in the steps hierarchy. You can now define the exception flow by adding new steps and organizing the hierarchy under this exception step.

14.2.4.2 Using Exception Handling

Defining exception handling for a Load Plan step consists of associating an Exception Step to this Load Plan step and defining the exception behavior. Exceptions steps can be set for each step except for When and Else steps. To define exception handling for a Load Plan step:

1. Open the Load Plan Editor and go to the Steps tab.

2. In the Steps Hierarchy table, select the step for which you want to define an

exception behavior. The Property Inspector displays the Step properties.

3. In the Exception Handling section of the Property Inspector, set the parameters as

follows: ■ Timeout s : Enter the maximum time in seconds that this step takes before it is aborted by the Load Plan. When a time-out is reached, the step is marked in error and the Exception step if defined is executed. In this case, the exception step never times out. If needed, a timeout can be set on a parent step to safe guard such a potential long running situation. If the step fails before the timeout and an exception step is executed, then the execution time of the step plus the execution time of the exception step should not exceed the timeout, otherwise the exception step will fail when the timeout is reached. Note that the default value of zero 0 indicates an infinite timeout. ■ Exception Step : From the list, select the Exception step to execute if this step fails. Note that only Exception steps that have been created and defined on the Exceptions tab of the Load Plan Editor appear in this list. See Section 14.2.4.1, Defining Exceptions Flows for more information on how to create an Exception step. ■ Exception Behavior : Defines how this step behaves in case an exception is encountered. Select one of the following: – Run Exception and Raise : Runs the Exception Step if any and raises the exception to the parent step. – Run Exception and Ignore : Runs the Exception Step if any and ignores the exception. The parent step is notified of a successful run. Note that if an exception is caused by the exception step itself, the parent step is notified of the failure. For Parallel steps only, the following parameters may be set: Max Error Child Count : Displays the maximum number of child steps in error that is accepted before this step is to be considered in error. When the number of failed child steps exceeds this value, the parallel step is considered failed. The currently running child steps are continued or stopped depending on the Restart Type parameter for this parallel step: