Recursive Loop End

The Recursive Loop node pair enables the passing of data tables from the Recursive Loop End back to the Recursive Loop Start.

The Recursive Loop Start requires initialized tables. These tables are output by the Recursive Loop Start in the first iteration of the loop.

The tables received by the corresponding Recursive Loop End are passed back to the Recursive Loop Start node. Starting with the second iteration, the Recursive Loop Start node outputs the data as received by the Recursive Loop End.

You can add more recursion input tables and collector input and output tables using the “+” button on the node. The number of recursion ports must be the same as the number of recursion ports of the corresponding Recursive Loop Start node. Recursion and collector ports are independent of each other. The collection ports are always listed first.

The loop runs until one of the three stopping criteria is met:

  • Maximum number of iterations: to ensure no endless loop is created, the loop will end after the set number of iterations.
  • Minimal number of rows: to ensure enough rows are present for processing, the loop stops if one of its recursion input tables contains fewer rows than the set minimum. This minimum can be set for each recursion input table individually.
  • End loop with variable: the loop ends if the option is enabled and the value of the selected variable equals “true”.

The data passed to the collector ports is collected and passed to the n respective output ports. The data at the recursion ports (all ports after input port n) is returned to the Recursive Loop Start node.

Options

Minimal number of rows
The minimal number of rows for each recursion input table required to continue iterating. If one of the tables falls below its configured minimum, the loop stops. The minimum can be set per recursion input table individually.
  • Minimal number of rows for input port: Minimal number of rows for the recursion input table required to continue iterating. If the number of rows falls below this threshold, the loop stops.
Maximal number of iterations
The maximum number of iterations the loop will run. Prevents endless loops.
End loop with variable
Enables ending the loop based on a flow variable. When selected, choose the flow variable that terminates the loop when its value equals “true”.
Data collection
Configure how data from each collection port is collected across iterations.
  • Collect data from last iteration only: If this option is checked, only the last input to the corresponding collecting data port is passed through to the outport. Hence, the data of earlier iterations is discarded. This option can be set for each collector port individually.
  • Add iteration column: Adds a column containing the iteration number to the corresponding collector output table. Disabled when only the last iteration is collected. Configurable per collector port.
Propagate modified loop variables
If checked, variables whose values are modified within the loop are exported by this node. These variables must be declared outside the loop, i.e. injected into the loop from a side-branch or be available upstream of the corresponding loop start node. For the latter, any modification of a variable is passed back to the start node in subsequent iterations (e.g. moving sum calculation). Note that variables defined by the loop start node itself are excluded as these usually represent loop controls (e.g. "currentIteration").

Input Ports

Icon
Data to be collected for the output.
Icon
Data to be passed back to loop start.
Icon
Data to be collected for the output.
Icon
Data to be passed back to loop start.

Output Ports

Icon
The rows collected from the corresponding collector port.
Icon
The rows collected from the corresponding collector port.

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.