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.”|
|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"> //...do various things... <if condition="somecondition"> <true> <break/> </true> </if> //...do various other things... </while>