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

Introducing compensation in business processes


In this section, we introduce a new sample BPEL process that models a compensation scenario. The high-level process execution is depicted in the following figure:

The registerBookOrder scope models the registration of a new book order. It includes an <empty/> activity called dummyRegisterBookOrder that simulates the registration behavior. Also, the scope contains a compensation handler, which will be discussed later in this chapter. This compensation handler discards the book order as the compensation logic. For demonstration purposes, the compensation handler also includes a <wait/> activity with a 30-seconds delay to allow time to monitor the activity, otherwise things might happen too fast to observe.

The initiateCreditCardTransaction scope models the credit card transaction related to the new book order. It includes an <empty/> activity called dummyInitiateCreditCardTransaction that simulates the credit card transaction....