Thursday, 26 July 2012

Fault-policy frame work in SOA 11g

In this post we will discuss the fault-policy framework in SOA 11g.
Conceptual wise no changes in this release when compare to 10g. But some changes are there in placing these files and etc.

First of all this framework will work only for the faults at invoke activity.
To implement fault-policy framework we have to have two xml files called fault-bindings.xml and fault-policies.xml.

A fault policy bindings file associates the policies defined in a fault policy file with the SOA composite application or the component.

A fault policy file defines fault conditions and their corresponding fault recovery actions. Each fault condition specifies a particular fault or group of faults, which it attempts to handle, and the corresponding action for it.
And these files should be created based on below XML schema.

We can have these xml files in the same directory as the composite.xml file of the SOA composite application or we can place it in a different location and access those by using below properties in composite.xml


<property name="oracle.composite.faultPolicyFile">oramds:/apps/components/faultpolicies/fault-Policies.xml
Below diagram shows how BPEL process behaves when we use fault-policy frame-work.

So when we are using this framework, it takes precedence over catch and catchAll blocks in BPEL.
Below are the sample fault-policies and fault-bindings.xml

fault-policies.xml :

<?xml version="1.0" encoding="UTF-8"?>
<faultPolicies xmlns=""
<faultPolicy version="2.0.1" id="PannPolicy1">
<faultName xmlns:bpelx="" name="bpelx:remoteFault">
<action ref="ora-terminate"/>
<faultName xmlns:bpelx="" name="bpelx:bindingFault">
<action ref="ora-retry"/>
<action ref="ora-human-intervention"/>
<Action id="ora-terminate">
<Action id="ora-retry">
<Action id="ora-human-intervention">


<?xml version="1.0" encoding="UTF-8"?>
<faultPolicyBindings version="2.0.1" xmlns=""

<composite faultPolicy=" PannPolicy 1"/>
<component faultPolicy=" PannPolicy 1 ">
<component faultPolicy=" PannPolicy 1 ">

Infault-policies.xml condition section, we can have actions based on the evaluation of fault-variable available on the fault. Like below.

<test>$fault.code="ABC Error"</test>
<action ref="ora-terminate"/>

Some predefind actions were provided by oracle are:


We will see how to use custom java code in fault-policy framework in coming posts.


No comments:

Post a Comment