Sharing Fault Policies Across Your Oracle BPM 11g Projects

This post is specifically about how to maintain and share enterprise level Fault Policies that can be re-used across all your BPM 11g projects. I’m assuming that you know enough about BPM/SOA Suite Exception Handling in general  using Fault Policies. If you are looking for more basic information on Fault Handling,  check Using Fault Handling In A BPEL Process  in the SOA Suite Developer’s Guide.

If you read the SOA Suite Developer’s Guide, it is clear that the best strategy is to maintain your Fault Policy and Fault Binding files in MDS and refer to them from all of your SOA/BPM projects.

Here’s a snippet that shows how to refer to Fault Policies shared via MDS in your composite.xml

Example 12–3 Fault Policies used by Multiple SOA Composite Applications








Although we understood this, the documentation does not explicitly specify how to implement this strategy . Well, to be fair , it kind of does,  but the information is pretty scattered across different topics within the Fusion Middleware Documentation. This post aims to bring all the information together in one place so that it becomes an easy reference for anybody trying to implement this strategy.

Here are the steps…

  • 1. Create a Shared SOA Application ( I call it SharedMetadataApp) to contain your Fault Policies.

We keep all our shared metadata across projects ( for example, some shared xsd files) in this SOA application. The shared fault policy files can be a part of the same application.

Lets create a new application (I call it SharedMetaDataApp) of type SOA Application.

Create SOA Application

  • 2. Create a SOA project (I call it SharedMetadata) in the SOA application with an empty composite

Create SOA Project

Empty Composite

 3. Create a new folder in the SOA project ( I call it FaultPolicies).

This is where we will be placing the Fault Policy and Binding Files.

Create Folder

4. Create the Fault Policy  and Binding files in this folder

Here is a starter Fault Policy file.

<?xml version=’1.0′ encoding=’UTF-8′?>

<faultPolicies xmlns=”“>


version=”2.0.1″ id=”EnterpriseFaultPolicy”               xmlns:env=”





<faultName xmlns:bpelx=”



<action ref=”ora-human-intervention”/>





<Action id=”ora-human-intervention”>






Here is a starter Fault Policy Binding file

<?xml version=”1.0″ encoding=”UTF-8″?>

<faultPolicyBindings version=”2.0.1″



<composite faultPolicy=”EnterpriseFaultPolicy”/>


This is how your folder structure should look at this point.

Fault Policy Folder Structure

5.  Publish the Fault Policy and Binding Files to MDS

      a. Create a Jar Deployment Profile for the project.

Navigate to  Project Properties /Deployment.

You should see a SOA-SAR File deployment profile

SOA SAR Deployment Profile

Delete this profile.

Create a new Deployment Profile of type Jar file

Jar Deployment Profile

In the Deployment Profile properties, deselect the include Manifest file

Deselect Include Manifest

From Contributors, deselect Project Output Directory and Project Dependencies and add the Sharedmetadata project folder as a Contributor.

Deselect Project Output Directory and Dependencies

Add Contributor

Set the filters to select only the files you want to publish to MDS


That should be it for creating the Jar deployment profile.

b. Create a SOA-Bundle deployment profile

Navigate to Application Properties/Deployment and click on new deployment profile.Create a new Deployment Profile of Archive Type SOA Bundle. In the Dependencies select the Jar deployment profile we created in step (a).

SOA Bundle

SOA Bundle

SOA Bundle Dependencies 6.  Create a SOA-MDS Connection in JDeveloper, so that you can view the contents in MDS, once we deploy.

Make sure you select the soa-infra partition.

SOA-MDS Connection

Create SOA-MDS Connection

You will now see the connection in the Resource Palette , IDE Connections.

SOA-MDS In Resource Palette in IDE Connections

Expand the /apps folder and you should see that its empty (except for perhaps a readme file, which you can ignore)

Empty Apps Folder In SOA-MDS

7.  Deploy the policy files to MDS

Navigate to Application/Deploy/SharedMetadataBundle…


Deploy to Application Server

Deploy To Application Server

Deploy to SOA server

Deploy To SOA Server

After a successful deployment, refresh and expand the apps folder in your SOA-MDS connection ( in Resource Palette/IDE Connections).

You should now see the FaultPolicy folder in there with the FaultPolicy and Binding files.

8. Setting the reference to the Fault Policy in a BPM or SOA application that wants to use this policy.

Add these references in your Composite.xml

  <property name=”oracle.composite.faultPolicyFile”>



<property name=”oracle.composite.faultBindingFile”>



Its important that you add these lines  after the last service definition and before the first component definition, otherwise the xml will not validate.

<service name=”SimpleWithNoLoggingService.service”


<interface.wsdl interface=””


< port=””/>


< port=””/>



<property name=”oracle.composite.faultPolicyFile”>oramds:/apps/FaultPolicy/FaultPolicy.xml</property>

  <property name=”oracle.composite.faultBindingFile”>oramds:/apps/FaultPolicy/FaultPolicyBinding.xml</property>     

<component name=”Simple”>

<implementation.bpmn src=”processes/Simple.bpmn”/>


9. Deleting the FaultPolicy from MDS.

Here are the steps when you need to do this…in case any  folder structure in MDS is obsolete or not correct and you want to recreate it.

Start WLST from the /Middleware /Oracle_SOA1/common/bin

execute the following command from the wlst prompt.

sca_removeSharedData (‘http://oelhost:8001‘, ‘FaultPolicy’, ‘weblogic’, ‘welcome1’)

first parameter : SOA Server url

second parameter : Folder under ‘apps’ you want to delete

third parameter: user id

fourth parameter: password