Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Workflow instances now support pause(), resume(), restart(), and terminate() methods in local development
description: The pause(), resume(), restart(), and terminate() instance methods are now available in local development via wrangler dev
products:
- workflows
- workers
date: 2026-03-23 12:00:00 UTC
---

Workflow instance methods `pause()`, `resume()`, `restart()`, and `terminate()` are now available in local development when using `wrangler dev`.

You can now test the full Workflow instance lifecycle locally:

```ts
const instance = await env.MY_WORKFLOW.create({
id: "my-instance-id",
});

await instance.pause(); // pauses a running workflow instance
await instance.resume(); // resumes a paused instance
await instance.restart(); // restarts the instance from the beginning
await instance.terminate(); // terminates the instance immediately
```
3 changes: 1 addition & 2 deletions src/content/docs/workflows/build/local-development.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ pcx_content_type: reference
reviewed: 2024-11-27
sidebar:
order: 8

---

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.
Expand Down Expand Up @@ -56,4 +55,4 @@ Refer to the [`wrangler dev` documentation](/workers/wrangler/commands/general/#

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

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.
Wrangler Workflows commands `npx wrangler workflow [cmd]` are not supported for local development, as they target production API.
4 changes: 0 additions & 4 deletions src/content/docs/workflows/build/workers-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,6 @@ Return the status of a running Workflow instance.

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

:::caution
The following methods are not yet supported in local development.
:::

### pause

Pause a running Workflow instance.
Expand Down
8 changes: 6 additions & 2 deletions src/content/release-notes/workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ link: "/workflows/reference/changelog/"
productName: Workflows
productLink: "/workflows/"
entries:
- publish_date: "2026-03-23"
title: "Workflow instances now support pause(), resume(), restart(), and terminate() methods in local development"
description: |-
Workflow instance methods `pause()`, `resume()`, `restart()`, and `terminate()` are now available in local development when using `wrangler dev`.
- publish_date: "2025-09-12"
title: "Test Workflows locally"
description: |-
Workflows can now be tested with new test APIs available in the "cloudflare:test" module.

More information available in the Vitest integration [docs](/workers/testing/vitest-integration/test-apis/#workflows).
- publish_date: "2025-08-22"
title: "Python Workflows is now open beta"
Expand Down Expand Up @@ -100,4 +104,4 @@ entries:

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.

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/).
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/).
Loading