Business Process and Data Transformation Language Reference
[Home] [Back] [Next]
InterSystems: The power behind what matters   

Perform activities repeatedly as long as a condition is true.
<while condition='context.IsApproved="1"'>   ... </while>
Attribute or Element Description Value
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. An expression that evaluates to the integer value 1 (if true) or 0 (if false). This expression must use the scripting language specified by the containing <process> element.
name, disabled, xpos, ypos, xend, yend attributes See Common Attributes and Elements.”  
<annotation> element
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>.  
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">

  // various things...

  <if condition="somecondition">

  // various other things...


Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA