Workflow.resume()
The .resume()
method resumes a suspended workflow run with new data, allowing you to continue execution from a specific step.
Usage
const run = counterWorkflow.createRun();
const result = await run.start({ inputData: { startValue: 0 } });
if (result.status === "suspended") {
const resumedResults = await run.resume({
step: result.suspended[0],
resumeData: { newValue: 0 },
});
}
Parameters
params:
object
Configuration object for resuming the workflow run
ResumeSchema
Step | Step[] | string | string[]
RuntimeContext
Returns
resumedResults:
Promise<WorkflowResult<TOutput, TSteps>>
A promise that resolves to the result of the resumed workflow run