SOA / BPM 11g Fault Handling Framework ( fault-policies.xml , fault-bindings.xml )
Fault Handling Framework :
" Happy Path " always a big term in BPM World . More than a " Happy Path " , Exception Handling is important in terms of Real time business.
SOA Fault Handling Framework :
Exception Handling in terms of BPM :
1. Boundary Event --> Each activity level .
2. Event Sub-Process --> Process Level .
Exception Handling in terms of BPEL :
1. Catch.
2.Catch All.
3. Rethrow.
How to archive Exception Handling in Application level ?????????????
SCA is very important in terms of SOA Application ( Composite.xml )
Composite.xml :
Add following piece of code inside composite.xml
<property name="oracle.composite.faultPolicyFile">fault-policies.xml</property>
<property name="oracle.composite.faultBindingFile">fault-bindings.xml</property>
Fault Handlining :
1. Fault-bindings.xml
<?xml version="1.0" encoding="UTF-8" ?>
<faultPolicyBindings version="2.0.1" xmlns="http://schemas.oracle.com/bpel/faultpolicy"
xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance">
<composite faultPolicy="KrishnaFaults"/>
</faultPolicyBindings>
2. Fault-policies.xml
<?xml version="1.0" encoding="UTF-8" ?>
<faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
<faultPolicy version="2.0.1" id="KrishnaFaults"
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>
<action ref="ora-retry"/>
</condition>
</faultName>
</Conditions>
<Actions>
<Action id="my-java-handler">
<javaAction className="soatraining.faulthandling. MyFaultHandler"
defaultAction="ora-terminate" propertySet="myProps">
<returnValue value="OK" ref="ora-rethrow-fault"/>
</javaAction>
</Action>
<!-- Retry -->
<Action id="ora-retry">
<retry>
<retryCount>4</retryCount>
<retryInterval>2</retryInterval>
<exponentialBackoff/>
</retry>
</Action>
<!-- Rethrow action -->
<Action id="ora-rethrow-fault">
<rethrowFault/>
</Action>
<!-- Human Intervention -->
<Action id="ora-human-intervention">
<humanIntervention/>
</Action>
<!-- Terminate -->
<Action id="ora-terminate">
<abort/>
</Action>
</Actions>
<Properties>
<propertySet name="myProps">
<property name="logFileName">myfaulthandler.log</property>
<property name="logFileDir">c:\temp</property>
</propertySet>
</Properties>
</faultPolicy>
</faultPolicies>
Conditions and Action are very important in Fault-policies.xml.
Fault Handling Framework :
" Happy Path " always a big term in BPM World . More than a " Happy Path " , Exception Handling is important in terms of Real time business.
SOA Fault Handling Framework :
Exception Handling in terms of BPM :
1. Boundary Event --> Each activity level .
2. Event Sub-Process --> Process Level .
Exception Handling in terms of BPEL :
1. Catch.
2.Catch All.
3. Rethrow.
How to archive Exception Handling in Application level ?????????????
SCA is very important in terms of SOA Application ( Composite.xml )
Composite.xml :
Add following piece of code inside composite.xml
<property name="oracle.composite.faultPolicyFile">fault-policies.xml</property>
<property name="oracle.composite.faultBindingFile">fault-bindings.xml</property>
Fault Handlining :
1. Fault-bindings.xml
<?xml version="1.0" encoding="UTF-8" ?>
<faultPolicyBindings version="2.0.1" xmlns="http://schemas.oracle.com/bpel/faultpolicy"
xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance">
<composite faultPolicy="KrishnaFaults"/>
</faultPolicyBindings>
2. Fault-policies.xml
<?xml version="1.0" encoding="UTF-8" ?>
<faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
<faultPolicy version="2.0.1" id="KrishnaFaults"
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>
<action ref="ora-retry"/>
</condition>
</faultName>
</Conditions>
<Actions>
<Action id="my-java-handler">
<javaAction className="soatraining.faulthandling. MyFaultHandler"
defaultAction="ora-terminate" propertySet="myProps">
<returnValue value="OK" ref="ora-rethrow-fault"/>
</javaAction>
</Action>
<!-- Retry -->
<Action id="ora-retry">
<retry>
<retryCount>4</retryCount>
<retryInterval>2</retryInterval>
<exponentialBackoff/>
</retry>
</Action>
<!-- Rethrow action -->
<Action id="ora-rethrow-fault">
<rethrowFault/>
</Action>
<!-- Human Intervention -->
<Action id="ora-human-intervention">
<humanIntervention/>
</Action>
<!-- Terminate -->
<Action id="ora-terminate">
<abort/>
</Action>
</Actions>
<Properties>
<propertySet name="myProps">
<property name="logFileName">myfaulthandler.log</property>
<property name="logFileDir">c:\temp</property>
</propertySet>
</Properties>
</faultPolicy>
</faultPolicies>
Conditions and Action are very important in Fault-policies.xml.
I followed the same thing described above ,. But i am not not able to catch the fault . could u help me out .
ReplyDeleteIf u can send me ,complete sample source code to selvankalai6@gmail.com
good post
ReplyDeletebut this is for SOA ....not for BPM.....
ReplyDeleteThanks for sharing this great information I am impressed by the information that you have on this blog. Same as your blog i found another one Oracle SOA . Actually I was looking for the same information on internet for Oracle SOA and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject, you can learn more aboutOracle SOA . By attending Oracle SOA Training .
ReplyDelete
ReplyDeleteThanks for sharing this great information I am impressed by the information that you have on this blog. Same as your blog i found another one Oracle SOA Interview Questions and Answers
. Actually, I was looking for the same information on internet for
Oracle SOA Training and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject, you can learn more about Oracle SOA Tutorial also.
Thanks for sharing this great information I am impressed by the information that you have on this blog. Same as your blog i found another one Oracle SOA Interview Questions and Answers
ReplyDelete. Actually, I was looking for the same information on internet for
Oracle SOA Training and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject, you can learn more about Oracle SOA Tutorial also.
Thanks for the nice blog here.I was searching this one for a long time.This blog is very helpful for my studies..I got another one site also,which is same as yours Oracle BPM.Check this one also Oracle Fusion HCM Sure it will be helpful for you too..Once more iam thanking you for your creative blog.
ReplyDelete