Workflow.foreach()
The .foreach() method creates a loop that executes a step for each item in an array.
Usage example
workflow.foreach(step1, { concurrency: 2 });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
Returns
workflow:
Workflow
The workflow instance for method chaining