How ESQL expressions are used with While nodes and Switch nodes
Use an ESQL expression to specify the loop condition for a While node or to specify the exit condition for one of the output terminals of a Switch node.
Using an ESQL expression with a While node
The ESQL expression of a While node states the loop condition for the While loop to which the While node belongs.

Using ESQL expressions with a Switch node

To process the Switch node at runtime, the runtime code starts processing each output terminal in serial order starting with the topmost terminal. To process an output terminal, the runtime code evaluates the ESQL expression associated with the output terminal. If the ESQL expression evaluates to true, then the runtime code immediately stops processing output terminals and follows the flow branch connected to the output terminal whose ESQL expression evaluated to true.
If the runtime code reaches the Default output terminal (because the ESQL expressions associated with all the other output terminals returned false) then the runtime code evaluates the ESQL expression associated with the Default output terminal, finds that the result is true, and follows the flow branch connected to the output terminal.