Skip to main content

Workflow.foreach()

The .foreach() method creates a loop that executes a step for each item in an array.

Usage exampleDirect link to Usage example

workflow.foreach(step1, { concurrency: 2 });

ParametersDirect link to Parameters

step:

Step
The step instance to execute in the loop. The previous step must return an array type.

opts?:

object
Optional configuration for the loop. The concurrency option controls how many iterations can run in parallel (default: 1)
number

ReturnsDirect link to Returns

workflow:

Workflow
The workflow instance for method chaining

On this page