Workflow.dountil()
The .dountil() method executes a step until a condition is met. It always runs the step at least once before evaluating the condition. The first time the condition is evaluated, iterationCount is 1.
Usage exampleDirect link to Usage example
workflow.dountil(step1, async ({ inputData }) => true)
ParametersDirect link to Parameters
step:
Step
The step instance to execute in the loop
condition:
(params : ExecuteParams & { iterationCount: number }) => Promise<boolean>
A function that returns a boolean indicating whether to continue the loop. The function receives the execution parameters and the iteration count.
options?:
StepFlowEntryOptions
Optional identity and display metadata for this graph entry. Preserved through serialization and storage; has no effect on execution.
string
string
Record<string, unknown>
ReturnsDirect link to Returns
workflow:
Workflow
The workflow instance for method chaining