You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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:
13
13
14
14
* A new `waitForEvent` API that allows a Workflow to wait for an event to occur before continuing execution.
15
-
* 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
+
* 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.
16
16
* 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.
17
17
* Support for `vitest` for testing Workflows locally and in CI/CD pipelines.
18
18
@@ -31,7 +31,37 @@ For example, if you wanted to implement a human-in-the-loop approval process, yo
let event =awaitstep.waitForEvent<IncomingStripeWebhook>("receive invoice paid webhook from Stripe", { type: "stripe-webhook", timeout: "1 hour" })
38
+
// Rest of your Workflow
39
+
}
40
+
}
41
+
```
42
+
43
+
</TypeScriptExample>
44
+
45
+
You can then send a Workflow an event from an external service via HTTP or from within a Worker using the [Workers API](/workflows/build/workers-api/) for Workflows:
Copy file name to clipboardExpand all lines: src/content/docs/workflows/build/events-and-parameters.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ You can pass parameters to a Workflow in three ways:
18
18
19
19
* As an optional argument to the `create` method on a [Workflow binding](/workers/wrangler/commands/#trigger) when triggering a Workflow from a Worker.
20
20
* Via the `--params` flag when using the `wrangler` CLI to trigger a Workflow.
21
-
* Via the `step.waitForEvent` API, which allows a Workflow instance to wait for an event (and optional data) to be received _while it is running_.
21
+
* Via the `step.waitForEvent` API, which allows a Workflow instance to wait for an event (and optional data) to be received _while it is running_. Workflow instances can be sent events from external services over HTTP or via the Workers API for Workflows.
22
22
23
23
You can pass any JSON-serializable object as a parameter.
0 commit comments