Skip to content

Commit bf5c026

Browse files
committed
Update Workflows local dev methods now working
1 parent 7c0d166 commit bf5c026

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Workflow instances now support pause, resume, restart, and terminate in local dev
3+
description: The pause(), resume(), restart(), and terminate() instance methods now work in local development via wrangler dev
4+
products:
5+
- workflows
6+
- workers
7+
date: 2026-03-12 12:00:00 UTC
8+
---
9+
10+
Workflow instance methods `pause()`, `resume()`, `restart()`, and `terminate()` now work in local development when using `wrangler dev`.
11+
12+
You can now test the full Workflow instance lifecycle locally:
13+
14+
```ts
15+
const instance = await env.MY_WORKFLOW.create({
16+
id: "my-instance",
17+
});
18+
19+
await instance.pause(); // pauses a running workflow instance
20+
await instance.resume(); // resumes a paused instance
21+
await instance.restart(); // restarts the instance from the beginning
22+
await instance.terminate(); // terminates the instance immediately
23+
```

src/content/docs/workflows/build/local-development.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ pcx_content_type: reference
44
reviewed: 2024-11-27
55
sidebar:
66
order: 8
7-
87
---
98

109
Workflows support local development using [Wrangler](/workers/wrangler/install-and-update/), the command-line interface for Workers. Wrangler runs an emulated version of Workflows compared to the one that Cloudflare runs globally.
@@ -56,4 +55,4 @@ Refer to the [`wrangler dev` documentation](/workers/wrangler/commands/#dev) to
5655

5756
Workflows are not supported as [remote bindings](/workers/development-testing/#remote-bindings) or when using `npx wrangler dev --remote`.
5857

59-
Wrangler Workflows commands `npx wrangler workflow [cmd]` are not supported for local development, as they target production API. The methods to `pause()`, `resume()`, `terminate()`, and `restart()` are also not yet implemented in local development.
58+
Wrangler Workflows commands `npx wrangler workflow [cmd]` are not supported for local development, as they target production API.

src/content/docs/workflows/build/workers-api.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,6 @@ Return the status of a running Workflow instance.
449449

450450
- <code>status(): Promise&lt;InstanceStatus&gt;</code>
451451

452-
:::caution
453-
The following methods are not yet supported in local development.
454-
:::
455-
456452
### pause
457453

458454
Pause a running Workflow instance.

0 commit comments

Comments
 (0)