LinkedIn

Tuesday, June 14, 2011

Lightweight introduction to Oracle SOA Suite 11g : Part II

Coming to Fault Handling Oracle SOA Suite allows fault handling based on policies
  • Using Fault Policies
  • Using Fault Bindings
Catch and throw faults at the process level. Handle different types of faults if you have to.


Add the fault bindings and fault policies file in the same directory where the composite.xml is.



Here is a sample custom example Fault Policies

<faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
<faultPolicy version="2.0.1" id="SalesCompositeFaultPolicy" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.oracle.com/bpel/faultpolicy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Conditions>
<faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:remoteFault">
<condition>
<test>$fault.code/code="WSDLReadingError"</test>
<action ref="ora-rethrow-fault"/>
</condition>
<condition>
<action ref="ora-retry"/>
</condition>
</faultName>
<faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:bindingFault">
<condition>
<action ref="ora-rethrow-fault"/>
</condition>
</faultName>
<faultName xmlns:medns="http://schemas.oracle.com/mediator/faults" name="medns:mediatorFault">
<condition>
<action ref="ora-rethrow-fault"/>
</condition>
</faultName>
<faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:runtimeFault">
<condition>
<action ref="ora-human-intervention"/>
</condition>
</faultName>
</Conditions>
<Actions>
<!-- This is an action will mark the work item to be "pending recovery from console"-->
<Action id="ora-human-intervention">
<humanIntervention/>
</Action>
<!--This is an action will bubble up the fault-->
<Action id="ora-rethrow-fault">
<rethrowFault/>
</Action>
<!--This action will attempt 5 retries with intervals of 4 seconds retry after 120, 240, 360 seconds -->
<Action id="ora-retry">
<retry>
<retryCount>3</retryCount>
<retryInterval>5</retryInterval>
<retryFailureAction ref="ora-human-intervention"/>
</retry>
</Action>
<!--This action will cause the instance to terminate-->
<Action id="ora-terminate">
<abort/>
</Action>
</Actions>
</faultPolicy>
</faultPolicies>

And Fault Bindings
<faultPolicyBindings version="2.0.1" xmlns="http://schemas.oracle.com/bpel/faultpolicy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<composite faultPolicy="SalesCompositeFaultPolicy"/>
</faultPolicyBindings>

And finally add these lines as properties inside the composite.xml



We can also create DVMs (Domain Value Maps) used to lookup cross system data that can be edited at runtime using the SOA composer UI just like we can edit Business Rules



We can also use the OOTB User Messaging Serviceto configure notification channels such as
  • Email
  • Voice Mail
  • IM
  • SMS
 

Setup user inbox to receive the notification emails.




This is pretty much it for now. Hope this gives an overview of what we can try and do with Oracle SOA Suite 11g.

No comments:

Post a Comment