Book Image

WS-BPEL 2.0 Beginner's Guide

Book Image

WS-BPEL 2.0 Beginner's Guide

Overview of this book

Table of Contents (19 chapters)
WS-BPEL 2.0 Beginner's Guide
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – adding fault handlers


The steps for adding fault handlers are as follows:

  1. We check the content of the input message before preparing the request to the query services. The <if> activity can be used to check the content of input and get an action based on the result. So let's drag-and-drop a new <if> activity in between the <receive> and <assign> activities that prepare the request message to the query service:

  2. Now, let's add the content verification logic as the condition in the <if> activity. Click on the if case in the <if> activity and use XPath Expression Builder to generate the expression in the box named Condition:

  3. Now, if the condition is true, the activity defined within the <if> case is executed. So let's generate a fault within the <if> case. In WS-BPEL 2.0, to generate a fault, the <throw> activity is used. Drag-and-drop a <throw> activity within the <if> case, as follows:

  4. The next step is to configure...