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 the <while> loop


Let us start with the <while> loop:

  1. Before adding the <while> loop, construct the BPEL flow. We will add two variables: NoOrders and i, both of the type xsd:int. We can add variables using the big green plus sign in the lower left window:

    Alternatively, we can write source code directly:

  2. Then we will need to know how many items we have in our list of book orders. We will use the XPath count() function to achieve this. Alternatively, we could use an Oracle extension function ora:countNodes(), but this would make our code vendor specific. At the same time, we will initialize the counter variable i. We will add an <assign> activity to the process flow and make both <copy> expressions. You can use the Edit Assign dialog windows (as we've shown in Chapter 3, Variables, Data Manipulation, and Expressions) or enter the source code directly:

  3. Now we are ready to add the <while> loop construct to the BPEL flow. You should drag...