Skip to main content

<while>

Perform activities repeatedly as long as a condition is true.

Syntax

<while condition='context.IsApproved="1"'>
   ... 
</while>

Attributes and Elements

condition attribute

Required. This expression is evaluated before each pass through the activities in the <while> element. Once false, it stops execution of the <while> element.

Specify an expression that evaluates the integer value 1 (if true) or 0 (if false).

LanguageOverride attribute

Optional. Specifies the scripting language in which any expressions (within in this element) are written.

Can be "python", "objectscript", or "basic" (not documented). Default is the language specified in the containing <process> element.

name, disabled, xpos, ypos, xend, yend attributes
Other elements

Optional. <while> may contain zero or more of the following elements in any combination: <alert>, <assign>, <branch>, <break>, <call>, <code>, <continue>, <delay>, <empty>, <flow>, <foreach>, <if>, <label>, <milestone>, <reply>, <rule>, <scope>, <sequence>, <sql>, <switch>, <sync>, <throw>, <trace>, <transform>, <until>, <while>, <xpath>, or <xslt>.

Description

The <while> element defines a sequence of activities that are repeatedly executed as long as a logical expression evaluates to the integer value 1 (true). The expression is re-evaluated before each loop through the sequence.

You can fine-tune loop execution by including <break> and <continue> elements within a <while> element. For example:

<while condition="0">

  //...do various things...

  <if condition="somecondition">
    <true>
      <break/>
    </true>
  </if>

  //...do various other things...

</while>
FeedbackOpens in a new tab