Skip to content

While Loop Open (Deprecated)

Opens a legacy while-style loop region. It emits a flow-control token and up to five pass-through values that act as the initial state for the loop. Actual looping is controlled by the corresponding While Loop Close node.
Preview

Usage

Use this node at the start of a while-loop section. Provide a boolean condition and any initial values you want to carry through each loop iteration. Connect its outputs to the nodes inside the loop and then to a While Loop Close node that evaluates the condition and triggers the next iteration. Prefer the newer Loop Open/Close nodes for most workflows.

Inputs

FieldRequiredTypeDescriptionExample
conditionTrueBOOLEANInitial condition flag for the loop. The loop proceeds while the paired close node evaluates true.True
initial_value0FalseWILDCARDFirst value carried into the loop (often used as a counter or primary state).5
initial_value1FalseWILDCARDSecond value carried into the loop.state-a
initial_value2FalseWILDCARDThird value carried into the loop.{'items': [1, 2, 3]}
initial_value3FalseWILDCARDFourth value carried into the loop.0.25
initial_value4FalseWILDCARDFifth value carried into the loop.False

Outputs

FieldTypeDescriptionExample
FLOW_CONTROLFLOW_CONTROLFlow-control token that must be connected to the matching While Loop Close node to form the loop.Flow control handle
value0*Pass-through of initial_value0 for use inside the loop.5
value1*Pass-through of initial_value1 for use inside the loop.state-a
value2*Pass-through of initial_value2 for use inside the loop.{'items': [1, 2, 3]}
value3*Pass-through of initial_value3 for use inside the loop.0.25
value4*Pass-through of initial_value4 for use inside the loop.False

Important Notes

  • Deprecated: This node is marked as deprecated. Prefer using Loop Open and Loop Close for new designs.
  • Pairing required: Must be paired with While Loop Close to function. The close node controls iteration and condition evaluation.
  • State slots: Provides exactly 5 state/value slots (value0–value4). Unused inputs will pass through as null.
  • Condition handling: The condition is provided here but is evaluated by the close node each iteration.
  • Common pattern: When used via For Loop wrappers, initial_value0 often holds the iteration counter.
  • Type agnostic: All value slots are wildcard-typed and can carry any supported data type.

Troubleshooting

  • Loop never iterates: Ensure the FLOW_CONTROL output is connected to a While Loop Close node and that the close node's condition input is correctly wired.
  • Values reset or None inside loop: Provide the corresponding initial_value inputs on the open node and ensure those outputs are connected through the loop into the close node.
  • Infinite loop or unexpected repeats: Inspect the condition fed into the close node; it must eventually evaluate to false or update state each iteration.
  • Wrong data carried between iterations: Verify that the loop close node routes updated values back into the open node's inputs for the next iteration.
  • Socket limit reached: Only five value slots are available (0–4). Consolidate data into a structure if more are needed, or switch to the newer Loop nodes.