This is the WSO2 Business Process Server documentation version 3.0.0.View documentation for the latest release.

Unknown macro: {next_previous_link3}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Objective

This sample explains how to use <while/>, where sequential iterations of repetitive tasks are required.

Deploying the Sample

WSO2 BPS provides a sample, which can be deployed and executed to understand the While constructs discussed above. Follow the instructions below to deploy and trigger the process.

1. Log in into BPS server management console and select "Processes -> Add" under the "Main" menu.

2. Upload the TestWhile.zip. (Samples are located at our sample repository).

3. In the "Deployed Processes" window, click the "Process ID" to access its "Process Information" window.

4. Under the "WSDL Details" widget, trigger the process using the "TryIt" link to create an instance of it.

Example Usage

Refer to the TestWhile.zip. In its example usage of the while construct, the counter variable is incremented until it's equal to 10 as follows:

<whilename="While">
   <condition><![CDATA[$counter < 10]]></condition>
   <assignvalidate="no"name="IncrementInput">
      <copy>
         <from><![CDATA[$counter + 1]]></from>
         <tovariable="counter"></to>
      </copy>
   </assign>
</while>
  • No labels