blokboard/ Open beta

Node reference

Iterate

Process items concurrently or sequentially

CoreFlow

Iterate turns an array into separate executions. Use item for work that should happen for each value and done for work that should happen after all those paths finish.

Iterate sends Plan, Build, and Review through item, then sends count 3 through done after all item paths finish.
Use item for the work and done for the summary

Three items start three item paths. Concurrent allows overlap; Sequential finishes each item before starting the next. The done path follows the item work.

Try it step by step

  1. Create a Global named items containing ["Plan","Build","Review"].
  2. Set Items to {{global.items}}. Connect item to a Variable whose message is Complete: {{iterate.output.item}}. Use the scope shown in your expression picker.
  3. Leave Sequential off (the default) to allow concurrent item paths, or turn it on to finish each item before starting the next. Connect done to a second Variable that reads the done count.

What to expect

The item path runs three times. The done path runs once with count: 3. An empty array produces no item executions and a done count of 0.

Things to check

  • Items must resolve to an array. Text that looks like an array is still text unless parsed.
  • Sequential waits for every started branch, including nested iterator work and its done continuation. If only starts the selected route. A listener must close before its item can finish.
  • Collect items accepts each result so Sequential can advance; it emits the list after source done. Connect work needing that list after Merge, not to a sibling done path.
  • Execution mode applies separately to each invocation. Concurrent outer items may each run a sequential inner iterator at the same time. State is shared across executions, but updating the same key in sibling branches or overlapping runs is not atomic.
  • Use State references and Update State to share a value between sequential items. Variables remain local to their paths. Initialize missing keys; explicitly clear temporary batches before each run.
  • Stop or a stop-on-error failure prevents later items from starting. Continue on failure ends the failed path; retries finish before the next item starts.
  • Join branches of the same item. Collect independent iterators before joining their results; an item cannot join its own done signal.

Keep learning

Parameters

SettingDefaultWhat it does
SequentialconcurrentOff: Concurrent lets item paths overlap. On: finish all work for one item before starting the next.
Items—Array to iterate. Leave empty to use the complete incoming value.
Node name(empty)Custom display name. References and connections keep their existing identifiers.

Sequential: Choices: Concurrent (concurrent), Sequential (sequential). Double-brace expressions are not resolved in this field.

Node name: Double-brace expressions are not resolved in this field.

Inputs

PortValueDescription
inarrayArray to iterate. If Items is empty, the entire input must be an array.

Outputs

PortValueDescription
itemanyOne execution token for each item in the input array.
doneobjectEmitted after all item paths created by this iteration complete.

The item port can emit more than once. Each emitted value starts its connected path.

done fields

FieldTypeDescription
countnumberNumber of iterated items.
sourceobjectOriginal source payload.

The done port waits for the descendant paths of item to finish.