Wednesday, 20 July 2011

Fault Management framework for Oracle SOA Suite

Fault management framework was introduced from BPEL PM It’s the feature which enables fault management outside the service and through minimal configuration. This blog lists down the steps to implement the Fault Management Framework in Oracle SOA suite 11g. Following are the major steps:
1.       Create Fault-bindings.xml file
2.       Create Fault-Policies.xml file
3.       Make entries of fault-bindings and Fault-Policies  file in composite.xml file

This file directs BPEL server that for which process, fault framework is implemented. Sample fault-bindings.xml looks like following:
<?xml version="1.0" encoding="UTF-8"?>
<faultPolicyBindings version="2.0.1"
        <!-- only applies for the SampleBPELProcess  process -->

        <component faultPolicy=" ServiceFaults">

Fault-policies.xml file
Through this file, BPEL server would determine what has to be done when specific fault occurs. Sample Fault-policies.xml looks like following:

<?xml version="1.0" encoding="UTF-8"?>
<faultPolicies xmlns=""
  <faultPolicy version="0.0.1" id="ServiceFaults"
           <faultName xmlns:bpelx=""
            <action ref="java-fault-handler"/> 
      <!-- Generics -->
       <Action id="java-fault-handler"> 
         <javaAction className="com.ent.SFault"
           <returnValue value="HW" ref="ora-human-intervention"/> 

      <Action id="default-human-intervention">
    <!--  not used in project--> 
      <!-- This action will attempt 8 retries at increasing intervals of 2, 4, 8, 16, 32, 64, 128, and 256 seconds. -->
      <Action id="ora-retry">
                                                                        <retryFailureAction ref="ora-terminate"/>
                                        <!-- This is an action will cause a replay scope fault-->
                                        <Action id="ora-replay-scope">
                                        <!-- This is an action will bubble up the fault-->
                                        <Action id="ora-rethrow-fault">
                                        <!-- This is an action will mark the work item to be "pending recovery from console"-->
                                        <Action id="ora-human-intervention">
                                        <!-- This action will cause the instance to terminate-->
                                        <Action id="ora-terminate">

oracle.composite.faultPolicyFile and oracle.composite.faultBindingFile properties of composite.xml determines the path of Fault-bindings.xml and Fault-Policies.xml files. Sample entries for composite.xml are as follows:
<property name="oracle.composite.faultPolicyFile">fault-policies.xml</property>
 <property name="oracle.composite.faultBindingFile">fault-bindings.xml</property>