Workflow.dountil()
The .dountil()
method creates a loop that executes a step until a condition is met.
Usage
workflow.dountil(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