From c7130c36f441cc37f034fff8c201fec9beaf32b7 Mon Sep 17 00:00:00 2001 From: Diogo Ferreira Date: Fri, 22 Nov 2024 15:54:49 +0000 Subject: [PATCH] Added information regarding the maximum length of a Workflow ID and its match pattern --- src/content/docs/workflows/build/workers-api.mdx | 4 +++- src/content/docs/workflows/reference/limits.mdx | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/content/docs/workflows/build/workers-api.mdx b/src/content/docs/workflows/build/workers-api.mdx index 78c21d3e661959f..34d98d76b3c25ff 100644 --- a/src/content/docs/workflows/build/workers-api.mdx +++ b/src/content/docs/workflows/build/workers-api.mdx @@ -173,7 +173,7 @@ Create (trigger) a new instance of the given Workflow. * `options` - optional properties to pass when creating an instance. -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. +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. ```ts // Create a new Workflow instance with your own ID: @@ -293,3 +293,5 @@ type InstanceStatus = { output?: object; }; ``` + +[^1]: Match pattern: _```^[a-zA-Z0-9_][a-zA-Z0-9-_]*$```_ diff --git a/src/content/docs/workflows/reference/limits.mdx b/src/content/docs/workflows/reference/limits.mdx index 1ea68153eefecb7..dd902217a8b4bef 100644 --- a/src/content/docs/workflows/reference/limits.mdx +++ b/src/content/docs/workflows/reference/limits.mdx @@ -23,9 +23,9 @@ Many limits are inherited from those applied to Workers scripts and as documente | Maximum `step.sleep` duration | 365 days (1 year) [^1] | | Maximum steps per Workflow | 256 [^1] | | Maximum Workflow executions | 100,000 per day [shared with Workers daily limit](/workers/platform/limits/#worker-limits) | Unlimited | -| Concurrent Workflow instances (executions) | 25 | 100 [^1] | +| Concurrent Workflow instances (executions) | 25 | 100 [^1] | | Retention limit for completed Workflow state | 3 days | 30 days [^2] | -| Maximum length of a Workflow ID | 64 bytes | +| Maximum length of a Workflow ID [^4] | 64 characters | [^1]: This limit will be reviewed and revised during the open beta for Workflows. Follow the [Workflows changelog](/workflows/reference/changelog/) for updates. @@ -33,4 +33,6 @@ Many limits are inherited from those applied to Workers scripts and as documente [^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. +[^4]: Match pattern: _```^[a-zA-Z0-9_][a-zA-Z0-9-_]*$```_ +