ForEachItem​For​Each​Item

Execute a subflow for each batch of items

The items value must be Kestra's internal storage URI e.g. an output file from a previous task, or a file from inputs of FILE type. Two special variables are available to pass as inputs to the subflow:

  • taskrun.items which is the URI of internal storage file containing the batch of items to process
  • taskrun.iteration which is the iteration or batch number

Restarting a parent flow will restart any subflows that has previously been executed.

yaml
type: "io.kestra.plugin.core.flow.ForEachItem"