The configuration of the fault management Framework for a SCA component has been made more flexible than it was in 10g. We can configure fault policies not only on composite level but also on component level. This enables us to configure retry policies not only on an error type and filter but also on specific components. To do this you just need two files:
- fault-policies.xml, fault-policies.xsd
- fault-bindings.xml, fault-bindings.xsd
You have to enable the fault policy by adding the files to your sca component, or you can add a reference in the sca component to hem, for example when they are placed in the mds.
fault-bindings.xml
Examples of fault-bindings.xml files can be found in oracle’s documentations:
- Fault policy on composite level, the chapter is called fault-buildings.xml but they are talking about fault-bindings.xml don’t let this confuse you
- Fault policy on component level
fault-policies.xml
An detailed fault-policies.xml file can be found here.
Mediator
The Fault Management Framework is only applicable for mediators that processes their rules parallel, see documentation Fault Policies Mediator. If an error is matched in the fault policy an possible predefined fault action in the mediator will be ignored. Be aware of this when you are defining your fault policies and error handling.
Example
I have made a simple sca component to show the working of the framework. This sca component has two components {BPEL and Mediator} which are exposed as services to the outside world.
They will pass the message to a BPEL that throws a remote exception so we can test the working of the configured fault policies and bindings. In this case a simple available exception but in real it could be an custom defined Business exception to trigger the fault handling. We will see also the way to recover an BPEL instance and a Mediator instance.
The fault-policies.xml that’s configured in this project
This fault-bindings.xml that’s configured in this project
If you would like to define on component level the fault policies the fault-bindings.xml would look like this
Testing the composite
We deploy the composite and test if all the instances are cached by the defined fault policy.
Mediator Routing
First i invoked the service that’s connected to the mediator routing.
De defined fault policy works fine because the instance is been marked recoverable. By clicking on the link ‘Recoverable’ you get a popup where you can modify the payload (if needed) and select a recover action.
BPELRouting
Second i tested the service that’s connected to the BPELRouting component.
We have here also the same link to recover this instance.
That’s the end of a simple example to get started with the Fault Management Framework.
This example has been executed on
Fusion Middleware 11g (11.1.1.2.0)
Reference documentation

January 19th, 2010 at 15:13:53
Hi,
I have a faultpolicy for synchronous processes which calls custom java class which in turn calls a composite to perform some actions.After this the fault policy rethrows the error back to the faulted process.
But if I do not catch the fault in the calling process, the error ahndling composite also rolls back. Is this a known issue or am I missing something?
Thanks
Anju
January 21st, 2010 at 11:27:58
Hi Anju,
It sound that there is a fault in the configuration files. The re throw from the faulted process is this defined in the fault policy?
Please note that the fault policy works on the links from composite to composite. I could not say what the the fault policy will do when you preform a service call in ‘Embeded java’ in a process. I assume that this will not be picked-up by the fault policy.
February 10th, 2010 at 15:17:33
Sorry I think I explained it wrong. By custom java class , I meant a custom java fault handler.
This is invoked by the fault policy framework and logs the error. After that the framework rethrows the fault back. The contents of the action are as follows:
Action id=”custom-fault-handler”
javaAction className=”CustomFaultHandler” defaultAction=”ora-rethrow-fault”
returnValue value=”OK” ref=”ora-rethrow-fault”
February 19th, 2010 at 12:35:33
Hi,I am new to BPEL. I am trying to define Fault Policy Framework.
Can you pls provide both the XSDs as well.
February 19th, 2010 at 15:37:20
Hello Harry,
do you mean the xsd for fault-policies.xml and fault-bindings.xml?
I have supplied them in the post. Click on the xsd link next to the xml file.
Theo
February 19th, 2010 at 16:43:18
Can you let me know the importance of these XSD- fault-bindings.xsd and fault-policies.xsd.
I have mentione dthe schemaLocation but havent created any xsd. Still, it is working fine.
February 19th, 2010 at 17:06:03
I supplied the xsd files to see what you can configure in the policy.xml for example the different kind of RetryType you can specify.
With this xsd you can check if your xml files are correctly specified.
-Theo
February 23rd, 2010 at 14:39:29
Thanx Theo.
Can u pls help me on 1 more thing.
In my BPEL, I am calling DB adapter to update the table. I want to throw exception if the row updated is 0.
Pls suggest how to retrieve the no. of updated rows.
March 4th, 2010 at 14:15:15
Hi Theo,
The above example is working fine when i use the namespace as mentioned in the figures. I am trying to change the “xmlns:tns” and “targetNamespace” in XSDs and “xmlns” attribute in both XMLs.
After changing all these attributes to “http://www.harry.com/bpel/faultpolicy”, I am not able to see the BPEL in pending state. After execution, it is showing as faulted in EM.
Pls suggest.