Example: Single Fault Recovery for BPEL Processes

Managing SOA Composite Applications 8-33

10. Click Set Value, and click Yes when prompted to continue.

11. Click Recover to recover from the fault, then click Yes when prompted to

continue. The page refreshes to indicate that no faults occurred.

8.5.2.2 Example: Bulk Fault Recovery for BPMN Processes

For the social security number example, selecting Retry is not an option for performing a bulk recovery because the value for the social security number is incorrect and requires correction. An example of performing a bulk recovery with the Retry option is if the social security number is correct, but the system providing the credit rating service was temporarily unavailable and caused a composite reference fault. This prevents the messages from being delivered. Once the credit rating service is available again, selecting Retry re-attempts the invocation to the credit rating service through the composite reference. To perform bulk fault recovery for BPMN processes: 1. Perform Steps 1 through 2 of Section 8.5.1.1, Example: Single Fault Recovery for BPEL Processes. 2. In the search utility, enter criteria based on known fault parameters for example, the time range, composite name, component type BPMN process, and so on.

3. If the search returns too many results, limit it by selecting the Show only

recoverable faults checkbox.

4. From the Select list, choose Select All Recoverable.

5. From the Recovery Action list, select Abort.

All selected faults are manually terminated.

8.5.3 Examples of Fault Recovery for Oracle Mediator

This section provides an example of how to perform single and bulk fault recovery on an Oracle Mediator service component. ■ Section 8.5.3.1, Example: Single Fault Recovery for Oracle Mediator ■ Section 8.5.3.2, Example: Bulk Fault Recovery for Oracle Mediator In this example, a service binding component for an inbound Siebel adapter submits a payload message to Oracle Mediator for transformation. The processed payload message is then delivered to a reference binding component for an outbound file adapter. However, the outbound directory into which to write the payload message is not configured with write permissions. This causes a fault to occur. The fault policy defined during design time specifies that the fault be manually recovered through human intervention. Note that three retries are attempted, as defined with the retryCount attribute. The condition and action are defined as follows in the fault-policies.xml file. Recoverable Oracle Mediator faults do not require a fault policy though it is one way to make faults recoverable, as described through an ora-human-intervention action. Any parallel routing rule that receives a remote fault from the outbound end point also creates a recoverable fault in this specific example, the fault policy is not required if the Oracle Mediator uses a parallel routing rule to invoke the outbound file adapter. faultPolicies xmlns=http:schemas.oracle.combpelfaultpolicy 8-34 Oracle Fusion Middleware Administrators Guide for Oracle SOA Suite and Oracle BPM Suite faultPolicy version=2.0.1 id=ConnectionFaults xmlns:env=http:schemas.xmlsoap.orgsoapenvelope xmlns:xs=http:www.w3.org2001XMLSchema xmlns=http:schemas.oracle.combpelfaultpolicy xmlns:xsi=http:www.w3.org2001XMLSchema-instance Conditions faultName xmlns:medns=http:schemas.oracle.commediatorfaults name=medns:mediatorFault condition testcontainsfault.mediatorErrorCode, TYPE_FATAL_ MESHtest action ref=ora-retry condition faultName Conditions . . . . . . Action id=ora-retry retry retryCount3retryCount retryInterval5retryInterval retryFailureAction ref=ora-human-intervention retrySuccessAction ref=ora-terminate retry Action Actions faultPolicy faultPolicies Note that processing is set to retry 3 times before terminating. The fault policies are associated with the ConnectionFaults composite application in the fault-bindings.xml file: faultPolicyBindings version=2.0.1 xmlns=http:schemas.oracle.combpelfault policy xmlns:xsi=http:www.w3.org2001XMLSchema-instance composite faultPolicy=ConnectionFaults faultPolicyBindings

8.5.3.1 Example: Single Fault Recovery for Oracle Mediator

For this example, the sap output directory is made read-only. An inbound file adapter retrieves the sender.xml file from the siebel directory and the message is routed through Oracle Mediator to an outbound file adapter reference for placing a file in the sap directory. To perform single fault recovery for Oracle Mediator: 1. Change the directory permissions at the operating system command prompt. chmod 000 sap cp sender.xml siebel

2. From the SOA Infrastructure menu, select Home.

3. Click the Faults and Rejected Messages tab.

Note that three faults appear, based on three retries being attempted. In this case, you see three retries only because the fault policy on the Oracle Mediator interaction with the outbound file adapter defines three retries. Without the fault policy, there is only one fault no automated retries.