- fault-policies.xml, fault-policies.xsd
- fault-bindings.xml, fault-bindings.xsd
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
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.