Вы находитесь на странице: 1из 2

Page 1 of 2

11/03/09 - Error Handling In SOA Suite 11G

This blog describes how to use Fault Management Framework in SOA suite 11G.

For error handling of our Mediator we just need two files the fault-policies.xml and
the fault-bindings.xml. The files must be placed inside your SOA Composite project
directory.

The fault-binding.xml file associates fault policies with composites or components.

In the next example we just put a reference to a fault policy named MyFaultHandler
for our BPEL component.

<?xml version="1.0"
encoding="UTF-8"?>Array<faultpolicybindings
version="2.0.1"Array
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"Array

xsi:schemaLocation="http://schemas.oracle.com/bpel/faultpolicy
fault-bindings.xsd"Array
xmlns="http://schemas.oracle.com/bpel/faultpolicy">Array
<composite
faultPolicy="MyFaultHandler"/>Array</faultpolicybindings>

The fault-policies file contains fault conditions and actions.

The following example shows the faultpolicy for MyFaultHandler. The faultpolicy
handles all remote faults that comes from my bpel-process. The action that must be
done when a remote fault occurs is called ora-human-intervention. In the
ora-human-intervention action we place the <humanIntervention/> tag which will
cause the process to be pauzed until it is handled by someone in the bpel-console.
Other predefined actions that can be used are for example retry or abort. All options
can be found in the fault-policy.xsd file.

The schema's (xsd's) for the fault-policy and fault-binding files can be found in the
Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite 11g.

<faultpolicies
Page 2 of 2

xmlns="http://schemas.oracle.com/bpel/faultpolicy"Array

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Array
<faultpolicy version="2.1.3" id="MyFaultHandler">Array
<conditions>Array <!-- Remote Fault Handler -->Array
<faultname
xmlns:bpelx="http://schemas.oracle.com/bpel/extension"Array
name="bpelx:remoteFault">Array
<condition>Array <action
ref="ora-human-intervention"/>Array </condition>Array
</faultName>Array </Conditions>Array <actions>Array
<!-- Human Intervention -->Array <action
id="ora-human-intervention">Array
<humanIntervention/>Array </Action>Array
</Actions>Array </faultPolicy>Array</faultPolicies>

The following screenshots show the flow trace of a BPEL-process instance with a
remoteFault.

As you can see the error can be recovered.

Error Handling In SOA Suite 11G5.051

Вам также может понравиться