Skip to content

Commit f3d08fb

Browse files
committed
update
1 parent 0331484 commit f3d08fb

File tree

3 files changed

+38
-43
lines changed

3 files changed

+38
-43
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: Workflows is now Generally Available
3+
description: Workflows is now GA - ship Workflows that you can rely on in production.
4+
- workflows
5+
- workers
6+
date: 2025-04-07T13:00:00Z
7+
---
8+
9+
import { Render, PackageManagers, TypeScriptExample } from "~/components"
10+
11+
[Workflows](/workflows/) is now _Generally Available_ (or "GA"): in short, it's ready for production workloads. Alongside marking Workflows as GA, we've introduced a number of changes during the beta period, including:
12+
13+
* A new `waitForEvent` API that allows a Workflow to wait for an event to occur before continuing execution.
14+
* Increased concurrency: you can [run up to 4,500 Workflow instances](/changelog/2025-02-25-workflows-concurrency-increased/) concurrently (and this will continue to grow)
15+
* Improved observability, including new CPU time metrics that allow you to better understand which Workflow instances are consuming the most resources and/or contributing to your bill.
16+
* Support for `vitest` for testing Workflows locally and in CI/CD pipelines.
17+
18+
Workflows also supports the new [increased CPU limits](/changelog/2025-03-25-higher-cpu-limits/) that apply to Workers, allowing you to run more CPU-intensive tasks (up to 5 minutes of CPU time per instance), not including the time spent waiting on network calls, AI models, or other I/O bound tasks.
19+
20+
#### Human-in-the-loop
21+
22+
The new `step.waitForEvent` API allows a Workflow instance to wait on events and data, enabling human-in-the-the-loop interactions, such as approving or rejecting a request, directly handling webhooks from other systems, or pushing event data to a Workflow while it's running.
23+
24+
Because Workflows are just code, you can conditionally execute code based on the result of a `waitForEvent` call, and/or call `waitForEvent` multiple times in a single Workflow based on what the Workflow needs.
25+
26+
For example, if you wanted to implement a human-in-the-loop approval process, you could use `waitForEvent` to wait for a user to approve or reject a request, and then conditionally execute code based on the result.
27+
28+
<TypeScriptExample>
29+
30+
```ts
31+
import { Workflow, WorkflowEvent } from "cloudflare:workflows";
32+
33+
34+
```
35+
36+
</TypeScriptExample>
37+
38+
Read the [GA announcement blog](https://blog.cloudflare.com/workflows-is-now-generally-available/) to learn more about what landed as part of the Workflows GA.

src/content/changelog/workflows/2025-04-07-workflows-human-in-the-loop copy.mdx

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/content/changelog/workflows/2025-04-07-workflows-human-in-the-loop.mdx

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)