Wednesday, July 16, 2014

Fault policy editor in SOA 12c

In SOA Suite 11c there were two fault policy files known as fault bindings and fault policies file.In order to develop custom fault and its handling mechanism user need to code directly in to the source view and add XML tags to create fault policies and take corresponding actions.Staring from SOA 12c there is a grpahical editor for the fault policies so that you need not go to the source file and do the manual coding for the fault policies.


We will see an example on how we can create a fault policies in SOA 12c and how it can be edited using a graphical editor

Click on File New and Select

SOA Tier-->Faults



You will get a default fault policy file created for you which you can customize as per your business requirement



Lets start creating a fault policy file by modifying the file created.

First of all give it a valid name and then create it for say Binding fault.

We will test the same by forcing our process to give binding fault



Now in the default action select default termination and save the changes.


You can add multiple condition to the action by clicking on the plus icon.

Further you can also define alert action such as notifying , logging and sending message to queue etc.



now once you have create the fault policies file, next comes the process to adding fault policies to the fault bindings. This again has changed in SOA 12c.

Go to you soa composite where you wanted to attache the fault policies to a bindings. And click on Edit composite Fault policies



Now here you can bind the custom fault policies that you have created for all the artifacts. If you have multiple policies file you can apply it to the artifacts accordingly. In my case since it is only one i have applied the same to all the artifacts.



So once you will complete the wizard you will see a binding file is automatically created for you which has the reference for the fault policy files corresponding to the artifacts



Now go ahead and test your web service.

Make some changes in the jndi to forcefully throw the binding fault.

Once you will test the process you will get that the instance is aborted



you can go inside the bpel process to see that actually the fault policies was called or not

No comments: