Skip to content

[types] add restart-from-step support to WorkflowInstance.restart()#6692

Open
vaishnav-mk wants to merge 4 commits intocloudflare:mainfrom
vaishnav-mk:vaish/restart-from-step
Open

[types] add restart-from-step support to WorkflowInstance.restart()#6692
vaishnav-mk wants to merge 4 commits intocloudflare:mainfrom
vaishnav-mk:vaish/restart-from-step

Conversation

@vaishnav-mk
Copy link
Copy Markdown
Contributor

@vaishnav-mk vaishnav-mk commented Apr 29, 2026

Extends WorkflowInstance.restart() to accept an optional from parameter, allowing users to restart a workflow instance from a specific step instead of from the beginning.

await instance.restart({ from: { name: 'aggregate' } });
await instance.restart({ from: { name: 'process', count: 3 } });
await instance.restart({ from: { name: 'checkpoint', type: 'do' } });

@vaishnav-mk vaishnav-mk requested review from a team as code owners April 29, 2026 03:39
@vaishnav-mk vaishnav-mk changed the base branch from vaish/restart-from-step to main April 29, 2026 03:39
@vaishnav-mk vaishnav-mk changed the title Vaish/restart from step [types] add restart-from-step support to WorkflowInstance.restart() Apr 29, 2026
@vaishnav-mk vaishnav-mk force-pushed the vaish/restart-from-step branch from e051554 to 91b56c7 Compare April 29, 2026 09:22
@vaishnav-mk vaishnav-mk requested a review from a team as a code owner April 29, 2026 09:22
@vaishnav-mk vaishnav-mk requested a review from ascorbic April 29, 2026 09:22
Fix the request body sent by WorkflowInstance.restart() to use 'from'
instead of 'step', matching the binding shim's expected field name.
Add tests for restart with no options, with step name only, and with
all options (name, count, type).
@vaishnav-mk vaishnav-mk force-pushed the vaish/restart-from-step branch from eb72e83 to 21c3939 Compare April 30, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant