This documentation is for WSO2 Enterprise Integrator version 6.5.0 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

All docs This doc
Skip to end of metadata
Go to start of metadata


This sample illustrates the basics of fault handling.

Introducing the <throw> Construct

In fault handling, <throw/> and <rethrow/> are used to generate faults where faults occurs.


Faults should be named with a unique scope level qualified name. For example,


Used only inside <catch/> or <catchAll/>, which will be described later in order to re-throw the originally caught exceptions. For example,


 Fault handling is implemented inside <faultHandlers/>. Faults can be handled based on qualified name of the thrown fault using <catch/> or every non-specified faults can be handles inside <catchAll/>. For example,



<faultHandlers/> should be defined in a parent scope.

Deploying the Sample

WSO2 BPS provides a sample, which can be deployed and executed to understand fault handling. Follow the instructions below to deploy and trigger the process.

1. Log in into BPS server management console and select "Processes -> Add" under the "Main" menu.

2. Upload the <EI_HOME>/samples/business-process/bpel/ directory. 

3. In the "Deployed Processes" window, click the "Process ID" to access its "Process Information" window.

4. Under the "WSDL Details" widget, trigger the process using the "TryIt" link to create an instance of it.

Example Usage

Refer In the child scope the input value is checked to see if it is equal to 1. If so, an InputException1 is thrown. Note that the thrown exception has a "saw:InputException1" qualified name. For example,


In the parent scope, the exception is filtered against its qualified name. For example,

  • No labels