Cisco Unified Application Environment Developer Forums

« Back to Developers

CUAE Designer - Loop and expressions

Combination View Flat View Tree View
Threads [ Previous | Next ]
If you drop a loop on the designer and set the "Count" property to a number, the designer will restricts the input to be at least 1. However, if you specify an expression which evaluates to an integer, the system will treat it to be at least 1.  ie. If you specify an expression which evaluates to 0, the content of the loop will still execute. One would expect it to skip over the whole block.  There's no documentation on how the loop is suppose to work so my question is, is this a bug?

Hi Chris,
 
Your observation is indeed correct, the loop functions as a do-while would, and the content of the loop will execute at least once.
For now, you will have to check the value of the expression before entering the loop. We shall, however, consider modifying how the loop works, as an enhancement request.
Apologies about the documentation gap here, this is something we're actively working on as well.
 
Thanks,
Neha