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

Delays


Sometimes in loops, but also on other occasions, we may want to program delays into BPEL processes. To do this we can specify durations or deadlines. Typically, we could specify delays to invoke an operation at a specific time, or wait for some time and then invoke an operation. For example, we could choose to wait a few seconds before invoking the BookWarehousing process, or before we pool the results of a previously initiated operation, or to wait between other iterations of a loop.

The simplest way to specify the delays is to use the <wait> activity. The <wait> activity can be:

  • for: Using this, we can specify duration; we specify a period of time. Consider the following code snippet:

    <wait>
      <for> duration-expression </for>
    </wait>
  • until: Using this, we can specify a deadline; we specify a certain date and time.

    <wait>
      <until> deadline-expression </until>
    </wait>

Deadline and duration expressions

To specify deadline and...