Skip to content

Commit 9231e61

Browse files
authored
Added information regarding the maximum length of a Workflow ID and its match pattern (#18355)
1 parent e68adcf commit 9231e61

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Create (trigger) a new instance of the given Workflow.
173173

174174
* `options` - optional properties to pass when creating an instance.
175175

176-
An ID is automatically generated, but a user-provided ID can be specified. This can be useful when mapping Workflows to users, merchants or other identifiers in your system.
176+
An ID is automatically generated, but a user-provided ID can be specified (up to 64 characters [^1]). This can be useful when mapping Workflows to users, merchants or other identifiers in your system.
177177

178178
```ts
179179
// Create a new Workflow instance with your own ID:
@@ -293,3 +293,5 @@ type InstanceStatus = {
293293
output?: object;
294294
};
295295
```
296+
297+
[^1]: Match pattern: _```^[a-zA-Z0-9_][a-zA-Z0-9-_]*$```_

src/content/docs/workflows/reference/limits.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,16 @@ Many limits are inherited from those applied to Workers scripts and as documente
2323
| Maximum `step.sleep` duration | 365 days (1 year) [^1] |
2424
| Maximum steps per Workflow | 256 [^1] |
2525
| Maximum Workflow executions | 100,000 per day [shared with Workers daily limit](/workers/platform/limits/#worker-limits) | Unlimited |
26-
| Concurrent Workflow instances (executions) | 25 | 100 [^1] |
26+
| Concurrent Workflow instances (executions) | 25 | 100 [^1] |
2727
| Retention limit for completed Workflow state | 3 days | 30 days [^2] |
28-
| Maximum length of a Workflow ID | 64 bytes |
28+
| Maximum length of a Workflow ID [^4] | 64 characters |
2929

3030
[^1]: This limit will be reviewed and revised during the open beta for Workflows. Follow the [Workflows changelog](/workflows/reference/changelog/) for updates.
3131

3232
[^2]: Workflow state and logs will be retained for 3 days on the Workers Free plan and for 7 days on the Workers Paid plan.
3333

3434
[^3]: A Workflow instance can run forever, as long as each step does not take more than the CPU time limit and the maximum number of steps per Workflow is not reached.
3535

36+
[^4]: Match pattern: _```^[a-zA-Z0-9_][a-zA-Z0-9-_]*$```_
37+
3638
<Render file="limits_increase" product="workers" />

0 commit comments

Comments
 (0)