Skip to content

Instantly share code, notes, and snippets.

@CedricL46
Last active November 20, 2020 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CedricL46/776dd278798f8a1c67f4378c0408d580 to your computer and use it in GitHub Desktop.
Save CedricL46/776dd278798f8a1c67f4378c0408d580 to your computer and use it in GitHub Desktop.
<!--fault-bindings.xml-->
<?xml version="1.0" encoding="UTF-8"?>
<faultPolicyBindings version="2.0.2"
xmlns="http://schemas.oracle.com/bpel/faultpolicy"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<composite faultPolicy="Faults_Policy"/>
</faultPolicyBindings>
<!--fault-policies.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
<faultPolicy version="2.0.2" id="Faults_Policy"
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:runtimeFault">
<condition>
<action ref="ora-retry-std"/>
</condition>
</faultName>
<faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:remoteFault">
<condition>
<action ref="ora-retry-std"/>
</condition>
</faultName>
<faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:bindingFault">
<condition>
<action ref="ora-retry-std"/>
</condition>
</faultName>
</Conditions>
<Actions>
<Action id="ora-rethrow-fault"> <!--If it still failed, the instance is marked as unrecoverable and need to be manually verified-->
<rethrowFault/>
</Action>
<Action id="ora-retry-exp"> <!--Retry once every 4 hours for 7 days / If it still fail : ora-rethrow-fault-->
<retry>
<retryCount>42</retryCount>
<retryInterval>14400</retryInterval>
<retryFailureAction ref="ora-rethrow-fault"/>
</retry>
</Action>
<Action id="ora-retry-std"> <!--Retry once every 20 minutes for 24 hours / If it still fail : ora-retry-exp-->
<retry>
<retryCount>72</retryCount>
<retryInterval>1200</retryInterval>
<retryFailureAction ref="ora-retry-exp"/>
</retry>
</Action>
</Actions>
</faultPolicy>
</faultPolicies>
<!--COMPOSITE/composite.xml -->
...
</service>
<property name="productVersion" type="xs:string" many="false">11.1.1.7.0</property> <!--Depend on your SOA BPEL Version -->
<property name="oracle.composite.faultPolicyFile">oramds:/apps/MetaData/faultPolicies/fault-policies.xml</property>
<property name="oracle.composite.faultBindingFile">oramds:/apps/MetaData/faultPolicies/fault-bindings.xml</property>
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment