Skip to content

Commit 30f57d4

Browse files
committed
Update Workflows local dev methods now working
1 parent fa17f5c commit 30f57d4

File tree

4 files changed

+30
-8
lines changed

4 files changed

+30
-8
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() methods in local development
3+
description: The pause(), resume(), restart(), and terminate() instance methods are now available in local development via wrangler dev
4+
products:
5+
- workflows
6+
- workers
7+
date: 2026-03-21 12:00:00 UTC
8+
---
9+
10+
Workflow instance methods `pause()`, `resume()`, `restart()`, and `terminate()` are now available 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-id",
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/general/#
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.

src/content/release-notes/workflows.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ link: "/workflows/reference/changelog/"
33
productName: Workflows
44
productLink: "/workflows/"
55
entries:
6+
- publish_date: "2026-03-21"
7+
title: "Workflow instances now support pause(), resume(), restart(), and terminate() methods in local development"
8+
description: |-
9+
Workflow instance methods `pause()`, `resume()`, `restart()`, and `terminate()` are now available in local development when using `wrangler dev`.
610
- publish_date: "2025-09-12"
711
title: "Test Workflows locally"
812
description: |-
913
Workflows can now be tested with new test APIs available in the "cloudflare:test" module.
10-
14+
1115
More information available in the Vitest integration [docs](/workers/testing/vitest-integration/test-apis/#workflows).
1216
- publish_date: "2025-08-22"
1317
title: "Python Workflows is now open beta"
@@ -100,4 +104,4 @@ entries:
100104
101105
A Workflow allows you to define multiple, independent steps that encapsulate errors, automatically retry, persist state, and can run for seconds, minutes, hours or even days. A Workflow can be useful for post-processing data from R2 buckets before querying it, automating a Workers AI RAG pipeline, or managing user signup flows and lifecycle emails.
102106
103-
You can learn more about Workflows in [our announcement blog](https://blog.cloudflare.com/building-workflows-durable-execution-on-workers/), or start building in our [get started guide](/workflows/get-started/guide/).
107+
You can learn more about Workflows in [our announcement blog](https://blog.cloudflare.com/building-workflows-durable-execution-on-workers/), or start building in our [get started guide](/workflows/get-started/guide/).

0 commit comments

Comments
 (0)