Example: Bulk Fault Recovery for BPEL Processes

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. Managing SOA Composite Applications 8-35

4. Click the specific instance ID in the Composite Instance ID column.

The Flow Trace appears. The faults table at the top of the page displays the fault messages. If you want to see where the faulted Oracle Mediator instance is located in the overall message flow, select the fault in the faults table. This highlights the associated instance in the trace table. You can then click the instance to access its audit trail to see more details about the faulted flow. 5. Locate the Oracle Mediator component instance fault you want to recover in the Faults table and click Recover in the Recovery column. 6. Select Sender from the Payload Part list. The payload is automatically displayed in the Payload field. If necessary, payload modifications can be performed in this field. For this example, payload modification is not necessary. 7. Change the sap directory to be writable at the operating system command prompt. chmod 777 sap

8. Return to the Faults tab and click the Refresh icon in the upper right corner of the

page.

9. Click Retry.

10. Click Yes when prompted to resubmit the selected fault for recovery.

The page refreshes to indicate that no faults occurred.

11. Click the Audit Trail tab.

The final message indicates that manual recovery was successful and the message payload was written to the sap directory. Note: Steps 4 through 10 represent one way to recover this single fault. The fault can also be recovered directly from the Oracle Mediator faults page through the Recovery Action list.