While
A While Element will execute over and over again up until a set criteria is met. While Elements are especially useful in combination with Code Elements, since it allows complex retries, loop checks and in some cases recursive behaviours.
A While Element contains an Expression parameter as well as a Max iterations parameter. The While Element will keep on executing for as long as the Expression is evaluated to true, and the max iteration count has not been reached. If the Max iteration count is reached, a While element will throw an exception. The Max iterations parameter is mandatory.
The return value of a While scope is the same as the last executed Return Element.
Example of usage
The Process above would call a HTTP endpoint until a certain value is received with 5 second sleep periods. For this to work, the While Element is configured with Expression to evaluate true when a specific value from the HTTP endpoint is received and assigned after the call http endpoint Task. If the needed value is not received from the HTTP endpoint and therefore the While Expression false, the Process would execute sleep 5 seconds Task and continue the iteration again.
The next article is Introduction to Return