Skip to Content

Workflow.dowhile()

The .dowhile() method creates a loop that executes a step while a condition is met.

Usage

workflow.dowhile(stepOne, async ({ inputData }) => true);

Parameters

step:

Step
The step instance to execute in the loop

condition:

(params : { inputData: any}) => Promise<boolean>
A function that returns a boolean indicating whether to continue the loop

Returns

workflow:

NewWorkflow
The workflow instance for method chaining