Runtime Fault Handling with the Fault Management Framework fig 5

Runtime Fault Handling with the Fault Management Framework

Fault handling allows a SOA suite component to handle error situations caused by outside web services.
The error situations can be both business (e.g. invalid data value) and runtime faults (service unavailable).
I’m aiming to handle business fault as much as possible in the composite (catch) while handle runtime faults outside the composite.

In the remaining of this blog I will describe an implementation of the Fault Management Framework to handle runtime faults.

I have implemented the following policy:
1) RemoteFault (invocation of a service fails)

  • Start a retry cycle
    standaard retryCount:                 5
    standaard retryInterval:              300 (seconden)
    standaard exponentialBackoff:   2
    Retry will take place after 5, 10, 20, 40 en 80 minutes.
  • If it still fails, start a human intervention

2) All other unhandled (runtime) faults

  • Start a human intervention

The specification of these fault policy is located in the Fault Policy Files.
The fault policy files are loaded at startup, so when any changes are made to them a server restart is required. The two fault policy files we’re  using are stored in the MDS. To use them a reference to them is required in the composite.xml file.  For this, add the following properties:

Runtime Fault Handling with the Fault Management Framework fig 1


Policy Files

The content of the policy files is show below:

 

Fault-binding.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>
<faultPolicyBindings version="1.0.0"
    xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
    xsi:schemaLocation=http://schemas.oracle.com/bpel/faultpolicy xsd/fault-bindings.xsd
    xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <composite faultPolicy="MOA-FaultPolicy"/>
</faultPolicyBindings>

 

Fault-policies.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>
<faultPolicies
    xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
    xsi:schemaLocation=http://schemas.oracle.com/bpel/faultpolicy xsd/fault-policies.xsd
    xmlns="http://schemas.oracle.com/bpel/faultpolicy">

    <faultPolicy version="1.0.0" id="MOA-FaultPolicy"
                 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>
            <faultName>
                <condition>
                    <action ref="ora-human-intervention"/>
                </condition>
            </faultName>
        </Conditions>

        <Actions>
            <Action id="ora-retry">
               <retry>
                  <retryCount>5</retryCount>
                  <retryInterval>300</retryInterval>
                  <exponentialBackoff>2</exponentialBackoff>
                  <retryFailureAction ref="ora-human-intervention"/>
               </retry>
            </Action>      
            <Action id="ora-human-intervention">
                <humanIntervention/>
            </Action>
        </Actions>

    </faultPolicy>
</faultPolicies>

Human Intervention with the Enterprise Manager

The following screenshot show a Medewerker (Employee) process instance that invokes the unavailable AccountService.

Runtime Fault Handling with the Fault Management Framework fig 2

 

After three retries, the instance is waiting for a human intervention.
After the first Error Message at the top of the screen the recovery flag is set. Click on the message and then on the recover now button or immediately on the recovery flag.

Runtime Fault Handling with the Fault Management Framework fig 3

 

After selecting the message, the following screen appears.

Runtime Fault Handling with the Fault Management Framework fig 4

In this screen you have the possibility to select a Recovery action, change process variables, and invoke the recover operation.

In situation when services are down, after bringing it up again, a retry is quite common (without changing any content).

Runtime Fault Handling with the Fault Management Framework fig 5

After recovery the process continues normally.

Also check Greg Mally’s blog post ‘Fault Management Framework by Example’ on Aug 22, 2011 to get a good impression of the functionality of the Framework (https://blogs.oracle.com/ateamsoab2b/entry/fault_management_framework_by_example).

 

4 Comments

  1. Nelson August 29, 2012
  2. Sadhana July 30, 2012
  3. Ahmed May 23, 2012
    • Marcel van de Glind July 4, 2012