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
About the Authors
About the Reviewers


When defining BPEL processes, some activities often need to execute more than once. For example, let us suppose that we had a business process that needed to warehouse an array of books. Other examples include performing calculations or invoking partner web service operations several times, and so on.

In BPEL, we can choose between three types of loops:

  • The <while> loops

  • The <repeatUntil> loops

  • The <forEach> loops

The <while> and <repeatUntil> loops are very similar to other programming languages. The <forEach> loop can also be found in some programming languages. In BPEL, <forEach> also provides the ability to start the loop instances in parallel, which can be very useful.

Let us now look at the <while> loop.


The <while> loop repeats the enclosed activities until the Boolean condition no longer holds true. The Boolean condition is expressed through the condition element, using the selected expression language (the default is XPath...