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 – specifying message event activities


To throw the fault and to exit the process, we will perform the following steps:

  1. Open the BookWarehousingBPEL process. We will drag-and-drop the <throw> activity to the message event handler scope.

  2. Name the <throw> activity ThrowCancelInstance.

  3. Double-click on the ThrowCancelInstance activity and then specify the Fault QName. The Namespace URI is the same as for the BPEL process itself: http://packtpub.com/Bookstore/BookwarehousingBPEL. The Local Part name should be CancelInstance. We will not specify the Fault Variable as the BPEL faults do not require a variable:

  4. Next, drag-and-drop the <exit> activity and place it after the <throw> activity. This way the process will terminate. We should see the following BPEL diagram:

What just happened?

We have added activities that will execute once the OnEvent message handler is triggered. We have decided to throw a fault and to exit the process instance. The following code...