workflow 5.0.0-beta.2 → 5.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-workflow.d.ts +1 -1
- package/dist/api-workflow.d.ts.map +1 -1
- package/dist/api-workflow.js +2 -2
- package/dist/api.d.ts +5 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +14 -2
- package/dist/internal/builtins.d.ts +17 -0
- package/dist/internal/builtins.d.ts.map +1 -1
- package/dist/internal/builtins.js +65 -1
- package/dist/observability.d.ts +1 -1
- package/dist/observability.js +2 -2
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +2 -2
- package/docs/ai/index.mdx +27 -23
- package/docs/api-reference/index.mdx +24 -0
- package/docs/api-reference/meta.json +8 -0
- package/docs/api-reference/vitest/index.mdx +28 -7
- package/docs/api-reference/workflow/create-hook.mdx +38 -0
- package/docs/api-reference/workflow/create-webhook.mdx +1 -0
- package/docs/api-reference/workflow/experimental-set-attributes.mdx +65 -0
- package/docs/api-reference/workflow/fetch.mdx +5 -0
- package/docs/api-reference/workflow/index.mdx +3 -0
- package/docs/api-reference/workflow-ai/durable-agent.mdx +7 -45
- package/docs/api-reference/workflow-api/get-hook-by-token.mdx +7 -0
- package/docs/api-reference/workflow-api/get-run.mdx +6 -0
- package/docs/api-reference/workflow-api/index.mdx +6 -8
- package/docs/api-reference/workflow-api/resume-hook.mdx +57 -0
- package/docs/api-reference/workflow-api/start.mdx +13 -5
- package/docs/api-reference/workflow-astro/index.mdx +18 -0
- package/docs/api-reference/workflow-astro/meta.json +4 -0
- package/docs/api-reference/workflow-astro/workflow.mdx +45 -0
- package/docs/api-reference/workflow-errors/hook-conflict-error.mdx +60 -0
- package/docs/api-reference/workflow-errors/index.mdx +85 -0
- package/docs/api-reference/workflow-errors/meta.json +5 -0
- package/docs/api-reference/workflow-errors/run-not-supported-error.mdx +58 -0
- package/docs/api-reference/workflow-errors/workflow-error.mdx +52 -0
- package/docs/api-reference/workflow-errors/workflow-run-failed-error.mdx +16 -6
- package/docs/api-reference/workflow-errors/workflow-run-not-completed-error.mdx +58 -0
- package/docs/api-reference/workflow-errors/workflow-runtime-error.mdx +58 -0
- package/docs/api-reference/workflow-nest/configure-workflow-controller.mdx +33 -0
- package/docs/api-reference/workflow-nest/index.mdx +31 -0
- package/docs/api-reference/workflow-nest/meta.json +9 -0
- package/docs/api-reference/workflow-nest/nest-local-builder.mdx +64 -0
- package/docs/api-reference/workflow-nest/workflow-controller.mdx +40 -0
- package/docs/api-reference/workflow-nest/workflow-module.mdx +74 -0
- package/docs/api-reference/workflow-next/with-workflow.mdx +56 -2
- package/docs/api-reference/workflow-nitro/index.mdx +59 -0
- package/docs/api-reference/workflow-nuxt/index.mdx +47 -0
- package/docs/api-reference/workflow-observability/hydrate-data.mdx +35 -0
- package/docs/api-reference/workflow-observability/hydrate-resource-io.mdx +62 -0
- package/docs/api-reference/workflow-observability/index.mdx +64 -0
- package/docs/api-reference/workflow-observability/meta.json +11 -0
- package/docs/api-reference/workflow-observability/observability-revivers.mdx +50 -0
- package/docs/api-reference/workflow-observability/parse-class-name.mdx +41 -0
- package/docs/api-reference/workflow-observability/parse-step-name.mdx +40 -0
- package/docs/api-reference/workflow-observability/parse-workflow-name.mdx +55 -0
- package/docs/api-reference/workflow-runtime/create-world.mdx +39 -0
- package/docs/api-reference/workflow-runtime/get-world-handlers.mdx +44 -0
- package/docs/api-reference/{workflow-api → workflow-runtime}/get-world.mdx +7 -10
- package/docs/api-reference/workflow-runtime/health-check.mdx +50 -0
- package/docs/api-reference/workflow-runtime/index.mdx +43 -0
- package/docs/api-reference/workflow-runtime/meta.json +12 -0
- package/docs/api-reference/workflow-runtime/set-world.mdx +49 -0
- package/docs/api-reference/workflow-runtime/workflow-entrypoint.mdx +42 -0
- package/docs/api-reference/{workflow-api → workflow-runtime}/world/index.mdx +5 -8
- package/docs/api-reference/workflow-runtime/world/meta.json +4 -0
- package/docs/api-reference/{workflow-api → workflow-runtime}/world/queue.mdx +2 -2
- package/docs/api-reference/{workflow-api → workflow-runtime}/world/storage.mdx +11 -4
- package/docs/api-reference/{workflow-api → workflow-runtime}/world/streams.mdx +2 -2
- package/docs/api-reference/workflow-serde/index.mdx +0 -1
- package/docs/api-reference/workflow-serde/workflow-deserialize.mdx +1 -2
- package/docs/api-reference/workflow-serde/workflow-serialize.mdx +1 -2
- package/docs/api-reference/workflow-sveltekit/index.mdx +18 -0
- package/docs/api-reference/workflow-sveltekit/meta.json +4 -0
- package/docs/api-reference/workflow-sveltekit/workflow-plugin.mdx +42 -0
- package/docs/api-reference/workflow-vite/index.mdx +18 -0
- package/docs/api-reference/workflow-vite/meta.json +4 -0
- package/docs/api-reference/workflow-vite/workflow.mdx +48 -0
- package/docs/changelog/attributes-mvp.mdx +380 -0
- package/docs/changelog/eager-processing.mdx +269 -0
- package/docs/changelog/index.mdx +2 -1
- package/docs/changelog/lazy-event-creation.md +127 -0
- package/docs/changelog/meta.json +7 -1
- package/docs/changelog/resilient-start.mdx +31 -283
- package/docs/changelog/turbo-mode.md +87 -0
- package/docs/cookbook/advanced/child-workflows.mdx +315 -0
- package/docs/cookbook/advanced/meta.json +2 -3
- package/docs/cookbook/advanced/publishing-libraries.mdx +87 -29
- package/docs/cookbook/advanced/serializable-steps.mdx +17 -5
- package/docs/cookbook/advanced/upgrading-workflows.mdx +195 -0
- package/docs/cookbook/agent-patterns/agent-cancellation.mdx +156 -0
- package/docs/cookbook/agent-patterns/durable-agent.mdx +11 -184
- package/docs/cookbook/agent-patterns/human-in-the-loop.mdx +150 -173
- package/docs/cookbook/agent-patterns/meta.json +1 -7
- package/docs/cookbook/common-patterns/batching.mdx +44 -118
- package/docs/cookbook/common-patterns/idempotency.mdx +36 -52
- package/docs/cookbook/common-patterns/meta.json +4 -4
- package/docs/cookbook/common-patterns/rate-limiting.mdx +1 -1
- package/docs/cookbook/common-patterns/saga.mdx +128 -33
- package/docs/cookbook/common-patterns/scheduling.mdx +77 -193
- package/docs/cookbook/common-patterns/sequential-and-parallel.mdx +155 -0
- package/docs/cookbook/common-patterns/timeouts.mdx +100 -0
- package/docs/cookbook/common-patterns/workflow-composition.mdx +117 -0
- package/docs/cookbook/index.mdx +14 -17
- package/docs/cookbook/integrations/ai-sdk.mdx +330 -142
- package/docs/cookbook/integrations/chat-sdk.mdx +264 -151
- package/docs/cookbook/integrations/sandbox.mdx +482 -81
- package/docs/cookbook/meta.json +1 -1
- package/docs/deploying/building-a-world.mdx +1 -1
- package/docs/deploying/world/postgres-world.mdx +5 -3
- package/docs/deploying/world/vercel-world.mdx +2 -0
- package/docs/errors/abort-signal-timeout-in-workflow.mdx +80 -0
- package/docs/errors/corrupted-event-log.mdx +5 -5
- package/docs/errors/hook-conflict.mdx +56 -4
- package/docs/errors/index.mdx +9 -0
- package/docs/errors/replay-divergence.mdx +27 -0
- package/docs/errors/runtime-decryption-failed.mdx +77 -0
- package/docs/errors/step-executed-multiple-times.mdx +23 -0
- package/docs/errors/step-not-registered.mdx +1 -1
- package/docs/foundations/cancellation.mdx +459 -0
- package/docs/foundations/errors-and-retries.mdx +7 -3
- package/docs/foundations/hooks.mdx +29 -0
- package/docs/foundations/idempotency.mdx +236 -11
- package/docs/foundations/index.mdx +3 -3
- package/docs/foundations/meta.json +3 -2
- package/docs/foundations/serialization.mdx +78 -42
- package/docs/foundations/starting-workflows.mdx +6 -2
- package/docs/foundations/streaming.mdx +14 -23
- package/docs/foundations/versioning.mdx +263 -0
- package/docs/getting-started/astro.mdx +6 -0
- package/docs/getting-started/index.mdx +6 -7
- package/docs/getting-started/meta.json +1 -0
- package/docs/getting-started/nestjs.mdx +9 -0
- package/docs/getting-started/next.mdx +5 -3
- package/docs/getting-started/nitro.mdx +22 -0
- package/docs/getting-started/sveltekit.mdx +6 -0
- package/docs/getting-started/tanstack-start.mdx +241 -0
- package/docs/how-it-works/cancellation.mdx +287 -0
- package/docs/how-it-works/code-transform.mdx +2 -2
- package/docs/how-it-works/encryption.mdx +2 -2
- package/docs/how-it-works/event-sourcing.mdx +2 -2
- package/docs/how-it-works/meta.json +2 -1
- package/docs/internal/index.mdx +21 -0
- package/docs/internal/meta.json +10 -0
- package/docs/internal/nitro-native-build.mdx +38 -0
- package/docs/internal/nitro-web-ui.mdx +24 -0
- package/docs/internal/serializable-abort-controller.mdx +148 -0
- package/docs/migration-guides/migrating-from-aws-step-functions.mdx +63 -16
- package/docs/migration-guides/migrating-from-inngest.mdx +44 -22
- package/docs/migration-guides/migrating-from-temporal.mdx +43 -14
- package/docs/migration-guides/migrating-from-trigger-dev.mdx +59 -27
- package/docs/observability/attributes.mdx +87 -0
- package/docs/observability/index.mdx +25 -1
- package/docs/observability/meta.json +1 -1
- package/docs/observability/tracing.mdx +106 -0
- package/docs/testing/index.mdx +2 -2
- package/package.json +14 -13
- package/docs/api-reference/workflow-api/world/meta.json +0 -4
- package/docs/api-reference/workflow-api/world/observability.mdx +0 -164
- package/docs/cookbook/advanced/custom-serialization.mdx +0 -168
- package/docs/cookbook/advanced/durable-objects.mdx +0 -148
- package/docs/cookbook/advanced/isomorphic-packages.mdx +0 -145
- package/docs/cookbook/agent-patterns/stop-workflow.mdx +0 -216
- package/docs/cookbook/agent-patterns/tool-orchestration.mdx +0 -255
- package/docs/cookbook/agent-patterns/tool-streaming.mdx +0 -181
- package/docs/cookbook/common-patterns/child-workflows.mdx +0 -372
- package/docs/cookbook/common-patterns/content-router.mdx +0 -207
- package/docs/cookbook/common-patterns/fan-out.mdx +0 -208
- package/docs/foundations/common-patterns.mdx +0 -265
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: experimental_setAttributes
|
|
3
|
+
description: Attach string metadata to workflow run for observability.
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Use experimental_setAttributes inside a workflow or step function to set run attributes.
|
|
6
|
+
prerequisites:
|
|
7
|
+
- /docs/foundations/workflows-and-steps
|
|
8
|
+
related:
|
|
9
|
+
- /docs/observability/attributes
|
|
10
|
+
- /docs/api-reference/workflow/fatal-error
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
Attaches string metadata to the current workflow run.
|
|
14
|
+
|
|
15
|
+
<Callout>
|
|
16
|
+
This API is experimental and may change before the stable attributes API is released.
|
|
17
|
+
</Callout>
|
|
18
|
+
|
|
19
|
+
```typescript lineNumbers
|
|
20
|
+
import { experimental_setAttributes } from "workflow"
|
|
21
|
+
|
|
22
|
+
export async function orderWorkflow(orderId: string) {
|
|
23
|
+
"use workflow"
|
|
24
|
+
|
|
25
|
+
await experimental_setAttributes({
|
|
26
|
+
phase: "received",
|
|
27
|
+
orderId,
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## API Signature
|
|
33
|
+
|
|
34
|
+
### Parameters
|
|
35
|
+
|
|
36
|
+
<TSDoc
|
|
37
|
+
definition={`
|
|
38
|
+
import { experimental_setAttributes } from "workflow";
|
|
39
|
+
export default experimental_setAttributes;`}
|
|
40
|
+
showSections={['parameters']}
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
|
|
45
|
+
Call `experimental_setAttributes` from a `"use workflow"` function or a `"use step"` function. Calling it from plain application code is not supported because there is no active workflow run.
|
|
46
|
+
|
|
47
|
+
Attribute values must be strings. Pass `undefined` to remove an attribute:
|
|
48
|
+
|
|
49
|
+
```typescript lineNumbers
|
|
50
|
+
import { experimental_setAttributes } from "workflow"
|
|
51
|
+
|
|
52
|
+
export async function cleanupAttributes() {
|
|
53
|
+
"use workflow"
|
|
54
|
+
|
|
55
|
+
await experimental_setAttributes({ staleKey: undefined })
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Attribute keys must be 1-256 characters, values must be strings up to 256 bytes, and each run can have up to 64 attributes. Keys that start with `$` are reserved for framework and library code.
|
|
60
|
+
|
|
61
|
+
Validation errors throw [`FatalError`](/docs/api-reference/workflow/fatal-error) and fail the run before an attribute write is attempted.
|
|
62
|
+
|
|
63
|
+
Calls from both workflow and step bodies append a native `attr_set` event, which the World materializes onto `run.attributes`. Workflow-originated events record a workflow writer; step-originated events record the originating step ID and attempt.
|
|
64
|
+
|
|
65
|
+
Native attributes require spec version 4 or later. Step-body storage errors throw from `experimental_setAttributes`; catch them inside the step if the write should be best-effort. Workflow-body writes are committed when the workflow suspends: transient storage errors are retried with the suspension, while a write the World rejects as invalid — such as exceeding the per-run attribute cap across multiple calls — fails the run with the validation error.
|
|
@@ -7,12 +7,17 @@ prerequisites:
|
|
|
7
7
|
- /docs/foundations/workflows-and-steps
|
|
8
8
|
related:
|
|
9
9
|
- /docs/errors/fetch-in-workflow
|
|
10
|
+
- /docs/foundations/idempotency
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
Makes HTTP requests from within a workflow. This is a special step function that wraps the standard `fetch` API, automatically handling serialization and providing retry semantics.
|
|
13
14
|
|
|
14
15
|
This is useful when you need to call external APIs or services from within your workflow.
|
|
15
16
|
|
|
17
|
+
<Callout type="warn">
|
|
18
|
+
Because workflow `fetch()` has retry semantics, use idempotency keys when the request mutates an external system, such as creating a charge, sending an email, or enqueueing work. See [Idempotency](/docs/foundations/idempotency).
|
|
19
|
+
</Callout>
|
|
20
|
+
|
|
16
21
|
<Callout>
|
|
17
22
|
`fetch` is a *special* type of step function provided and should be called directly inside workflow functions.
|
|
18
23
|
</Callout>
|
|
@@ -47,6 +47,9 @@ Workflow SDK contains the following functions you can use inside your workflow f
|
|
|
47
47
|
<Card href="/docs/api-reference/workflow/get-writable" title="getWritable()">
|
|
48
48
|
Access the current workflow run's default stream.
|
|
49
49
|
</Card>
|
|
50
|
+
<Card href="/docs/api-reference/workflow/experimental-set-attributes" title="experimental_setAttributes()">
|
|
51
|
+
Attach experimental string metadata to the current workflow run.
|
|
52
|
+
</Card>
|
|
50
53
|
</Cards>
|
|
51
54
|
|
|
52
55
|
## Error Classes
|
|
@@ -1,59 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: DurableAgent
|
|
3
|
-
description:
|
|
3
|
+
description: Deprecated DurableAgent API reference; use WorkflowAgent for new durable agents.
|
|
4
4
|
type: reference
|
|
5
|
-
summary:
|
|
5
|
+
summary: "Deprecated: use AI SDK's WorkflowAgent instead of DurableAgent."
|
|
6
6
|
prerequisites:
|
|
7
7
|
- /docs/ai
|
|
8
8
|
related:
|
|
9
9
|
- /docs/ai/defining-tools
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```typescript lineNumbers
|
|
17
|
-
import { DurableAgent } from "@workflow/ai/agent";
|
|
18
|
-
import { getWritable } from "workflow";
|
|
19
|
-
import { z } from "zod";
|
|
20
|
-
import type { UIMessageChunk } from "ai";
|
|
21
|
-
|
|
22
|
-
async function getWeather({ city }: { city: string }) {
|
|
23
|
-
"use step";
|
|
24
|
-
|
|
25
|
-
return `Weather in ${city} is sunny`;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
async function myAgent() {
|
|
29
|
-
"use workflow";
|
|
30
|
-
|
|
31
|
-
const agent = new DurableAgent({
|
|
32
|
-
model: "anthropic/claude-haiku-4.5",
|
|
33
|
-
instructions: "You are a helpful weather assistant.",
|
|
34
|
-
temperature: 0.7,
|
|
35
|
-
tools: {
|
|
36
|
-
getWeather: {
|
|
37
|
-
description: "Get weather for a city",
|
|
38
|
-
inputSchema: z.object({ city: z.string() }),
|
|
39
|
-
execute: getWeather,
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
// The agent will stream its output to the workflow
|
|
45
|
-
// run's default output stream
|
|
46
|
-
const writable = getWritable<UIMessageChunk>();
|
|
12
|
+
<Callout type="warn">
|
|
13
|
+
`DurableAgent` is deprecated. Use AI SDK's [`WorkflowAgent`](https://ai-sdk.dev/v7/docs/agents/workflow-agent#workflowagent) for new durable agents and migration guidance.
|
|
14
|
+
</Callout>
|
|
47
15
|
|
|
48
|
-
|
|
49
|
-
messages: [{ role: "user", content: "How is the weather in San Francisco?" }],
|
|
50
|
-
writable,
|
|
51
|
-
});
|
|
16
|
+
This reference is kept for existing applications that still import `DurableAgent` from `@workflow/ai/agent`. Do not use `DurableAgent` for new code.
|
|
52
17
|
|
|
53
|
-
|
|
54
|
-
console.log(result.messages);
|
|
55
|
-
}
|
|
56
|
-
```
|
|
18
|
+
For current examples and implementation guidance, see AI SDK's [`WorkflowAgent`](https://ai-sdk.dev/v7/docs/agents/workflow-agent#workflowagent) docs. For legacy code, the API surface below documents the existing `DurableAgent` exports.
|
|
57
19
|
|
|
58
20
|
## API Signature
|
|
59
21
|
|
|
@@ -5,6 +5,8 @@ type: reference
|
|
|
5
5
|
summary: Use getHookByToken to look up a hook's metadata and associated workflow run before resuming it.
|
|
6
6
|
prerequisites:
|
|
7
7
|
- /docs/foundations/hooks
|
|
8
|
+
related:
|
|
9
|
+
- /docs/foundations/idempotency
|
|
8
10
|
---
|
|
9
11
|
|
|
10
12
|
Retrieves a hook by its unique token, returning the associated workflow run information and any metadata that was set when the hook was created. This function is useful for inspecting hook details before deciding whether to resume a workflow.
|
|
@@ -13,6 +15,10 @@ Retrieves a hook by its unique token, returning the associated workflow run info
|
|
|
13
15
|
`getHookByToken` is a runtime function that must be called from outside a workflow function.
|
|
14
16
|
</Callout>
|
|
15
17
|
|
|
18
|
+
<Callout type="info">
|
|
19
|
+
Looking up a deterministic hook token is useful in hook-based idempotency flows, but it is only an advisory check. If no hook exists yet, another request can still start the same workflow before your `start()` call registers its hook. Use the lookup to avoid obvious duplicate starts, and handle the race inside the workflow by checking `await hook.getConflict()` before duplicate-sensitive work — on a conflict it resolves with the run that owns the token, so the duplicate can route the caller to the active owner. If duplicates must be rejected before a workflow body runs, keep a durable request record until native atomic start-and-hook registration exists. See [Run idempotency](/docs/foundations/idempotency#run-idempotency).
|
|
20
|
+
</Callout>
|
|
21
|
+
|
|
16
22
|
```typescript lineNumbers
|
|
17
23
|
import { getHookByToken } from "workflow/api";
|
|
18
24
|
|
|
@@ -178,3 +184,4 @@ export async function POST(request: Request) {
|
|
|
178
184
|
- [`resumeHook()`](/docs/api-reference/workflow-api/resume-hook) - Resume a hook with a payload.
|
|
179
185
|
- [`createHook()`](/docs/api-reference/workflow/create-hook) - Create a hook in a workflow.
|
|
180
186
|
- [`defineHook()`](/docs/api-reference/workflow/define-hook) - Type-safe hook helper.
|
|
187
|
+
- [Idempotency](/docs/foundations/idempotency) - Deduplicate step side effects and workflow starts.
|
|
@@ -5,12 +5,18 @@ type: reference
|
|
|
5
5
|
summary: Use getRun to check a workflow run's status and metadata without blocking on completion.
|
|
6
6
|
prerequisites:
|
|
7
7
|
- /docs/foundations/starting-workflows
|
|
8
|
+
related:
|
|
9
|
+
- /docs/foundations/idempotency
|
|
8
10
|
---
|
|
9
11
|
|
|
10
12
|
Retrieves the workflow run metadata and status information for a given run ID. This function provides immediate access to workflow run details without waiting for completion, making it ideal for status checking and monitoring.
|
|
11
13
|
|
|
12
14
|
Use this function when you need to check workflow status, get timing information, or access workflow metadata without blocking on workflow completion.
|
|
13
15
|
|
|
16
|
+
<Callout type="info">
|
|
17
|
+
`getRun()` retrieves a run when you already have its `runId`. It does not look up runs by a business key. For retried requests that should route to one active workflow, use a deterministic hook token and [`getHookByToken()`](/docs/api-reference/workflow-api/get-hook-by-token). After a hook conflict, `HookConflictError.conflictingRunId` can be passed to `getRun()` to inspect, stream, or return the active owner. See [Run idempotency](/docs/foundations/idempotency#run-idempotency).
|
|
18
|
+
</Callout>
|
|
19
|
+
|
|
14
20
|
```typescript lineNumbers
|
|
15
21
|
import { getRun } from "workflow/api";
|
|
16
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "workflow/api"
|
|
3
|
-
description: Runtime functions to inspect runs, start workflows, and
|
|
3
|
+
description: Runtime functions to inspect runs, start workflows, and manage hooks.
|
|
4
4
|
type: overview
|
|
5
5
|
summary: Explore runtime functions for starting workflows, inspecting runs, and managing hooks.
|
|
6
6
|
---
|
|
@@ -9,7 +9,7 @@ API reference for runtime functions from the `workflow/api` package.
|
|
|
9
9
|
|
|
10
10
|
## Functions
|
|
11
11
|
|
|
12
|
-
The API package is for access and introspection of workflow data to inspect runs, start new runs,
|
|
12
|
+
The API package is for access and introspection of workflow data to inspect runs, start new runs, and manage hooks.
|
|
13
13
|
|
|
14
14
|
<Cards>
|
|
15
15
|
<Card href="/docs/api-reference/workflow-api/start" title="start()">
|
|
@@ -27,10 +27,8 @@ The API package is for access and introspection of workflow data to inspect runs
|
|
|
27
27
|
<Card href="/docs/api-reference/workflow-api/get-run" title="getRun()">
|
|
28
28
|
Get workflow run status and metadata without waiting for completion.
|
|
29
29
|
</Card>
|
|
30
|
-
<Card href="/docs/api-reference/workflow-api/get-world" title="getWorld()">
|
|
31
|
-
Async: resolve the World instance for storage, queuing, and streaming backends.
|
|
32
|
-
</Card>
|
|
33
|
-
<Card href="/docs/api-reference/workflow-api/world" title="World SDK">
|
|
34
|
-
Low-level API for inspecting runs, steps, events, hooks, streams, and queues.
|
|
35
|
-
</Card>
|
|
36
30
|
</Cards>
|
|
31
|
+
|
|
32
|
+
<Callout type="info">
|
|
33
|
+
Looking for `getWorld()` and the World SDK? They are exported from `workflow/runtime` — see the [`workflow/runtime` reference](/docs/api-reference/workflow-runtime).
|
|
34
|
+
</Callout>
|
|
@@ -7,6 +7,7 @@ prerequisites:
|
|
|
7
7
|
- /docs/foundations/hooks
|
|
8
8
|
related:
|
|
9
9
|
- /docs/api-reference/workflow-api/resume-webhook
|
|
10
|
+
- /docs/foundations/idempotency
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
Resumes a workflow run by sending a payload to a hook identified by its token.
|
|
@@ -155,8 +156,64 @@ export async function POST(request: Request) {
|
|
|
155
156
|
}
|
|
156
157
|
```
|
|
157
158
|
|
|
159
|
+
### Resume or Start
|
|
160
|
+
|
|
161
|
+
A common endpoint shape is "resume or start": one route that resumes the active workflow run for a business key if one exists, or starts a new run otherwise. This comes up when the workflow uses a deterministic hook token as its idempotency key — for example, one active run per order or conversation.
|
|
162
|
+
|
|
163
|
+
`resumeHook()` is the resume half of that flow. Try it first; if it throws `HookNotFoundError`, no active run owns the token yet, so start the workflow. One subtlety: `start()` returns before the new run executes and registers its hook, so you cannot resume immediately after starting. Retry the resume until the hook is registered — if you drop the payload and only start the workflow, the data from this request is lost.
|
|
164
|
+
|
|
165
|
+
```typescript lineNumbers
|
|
166
|
+
import { resumeHook, start } from "workflow/api";
|
|
167
|
+
import { HookNotFoundError } from "workflow/errors";
|
|
168
|
+
import { processOrder } from "./workflows/process-order";
|
|
169
|
+
|
|
170
|
+
type OrderRequest = { confirmed: boolean };
|
|
171
|
+
|
|
172
|
+
async function resumeWithRetry(token: string, payload: OrderRequest) {
|
|
173
|
+
for (let attempt = 0; attempt < 5; attempt++) {
|
|
174
|
+
try {
|
|
175
|
+
return await resumeHook(token, payload); // [!code highlight]
|
|
176
|
+
} catch (error) {
|
|
177
|
+
if (!HookNotFoundError.is(error)) throw error;
|
|
178
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
throw new Error("Workflow did not register its hook in time");
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export async function POST(request: Request) {
|
|
186
|
+
const { orderId, confirmed } = await request.json();
|
|
187
|
+
const token = `order:${orderId}`;
|
|
188
|
+
const payload = { confirmed };
|
|
189
|
+
|
|
190
|
+
try {
|
|
191
|
+
// An active run already owns this token: resume it.
|
|
192
|
+
const hook = await resumeHook(token, payload); // [!code highlight]
|
|
193
|
+
return Response.json({ runId: hook.runId, reused: true });
|
|
194
|
+
} catch (error) {
|
|
195
|
+
if (!HookNotFoundError.is(error)) throw error;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// No hook yet: start a new run, then retry the resume so this
|
|
199
|
+
// request's payload still reaches the workflow.
|
|
200
|
+
const run = await start(processOrder, [orderId]); // [!code highlight]
|
|
201
|
+
const resumed = await resumeWithRetry(token, payload);
|
|
202
|
+
|
|
203
|
+
// A concurrent request can win the race between `start()` and hook
|
|
204
|
+
// registration; the resume always reaches the actual active owner.
|
|
205
|
+
return Response.json({
|
|
206
|
+
runId: resumed.runId,
|
|
207
|
+
reused: resumed.runId !== run.runId,
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
See [Run idempotency](/docs/foundations/idempotency#run-idempotency) for the full pattern, including how the workflow claims the token with `hook.getConflict()` and how concurrent starts converge on one active owner.
|
|
213
|
+
|
|
158
214
|
## Related Functions
|
|
159
215
|
|
|
160
216
|
- [`getHookByToken()`](/docs/api-reference/workflow-api/get-hook-by-token) - Get hook details before resuming.
|
|
161
217
|
- [`createHook()`](/docs/api-reference/workflow/create-hook) - Create a hook in a workflow.
|
|
162
218
|
- [`defineHook()`](/docs/api-reference/workflow/define-hook) - Type-safe hook helper.
|
|
219
|
+
- [Idempotency](/docs/foundations/idempotency) - Deduplicate step side effects and workflow starts.
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
title: start
|
|
3
3
|
description: Start and enqueue a new workflow run.
|
|
4
4
|
type: reference
|
|
5
|
-
summary: Use start to programmatically enqueue a new workflow run
|
|
5
|
+
summary: Use start to programmatically enqueue a new workflow run.
|
|
6
6
|
prerequisites:
|
|
7
7
|
- /docs/foundations/starting-workflows
|
|
8
|
+
related:
|
|
9
|
+
- /docs/foundations/idempotency
|
|
8
10
|
---
|
|
9
11
|
|
|
10
12
|
Start/enqueue a new workflow run.
|
|
@@ -50,11 +52,14 @@ Learn more about [`WorkflowReadableStreamOptions`](/docs/api-reference/workflow-
|
|
|
50
52
|
|
|
51
53
|
## Good to Know
|
|
52
54
|
|
|
53
|
-
* The `start()` function is used in runtime
|
|
55
|
+
* The `start()` function is used in runtime contexts to programmatically trigger workflow executions.
|
|
56
|
+
* In v5, `start()` can also be called directly from a workflow function to spawn a child run or continue work in a new run. See [Workflow Composition](/cookbook/common-patterns/workflow-composition) and [Versioning](/docs/foundations/versioning).
|
|
54
57
|
* This is different from calling workflow functions directly, which is the typical pattern in Next.js applications.
|
|
55
58
|
* The function returns immediately after enqueuing the workflow - it doesn't wait for the workflow to complete.
|
|
59
|
+
* Each call to `start()` creates a new workflow run. If retried requests must route to one active workflow, have the workflow create a deterministic hook token and use [`getHookByToken()`](/docs/api-reference/workflow-api/get-hook-by-token) to reuse an already-registered active hook. The lookup is not atomic with `start()`, so concurrent callers can still create extra runs before the hook is registered; handle that race inside the workflow by checking `await hook.getConflict()` before duplicate-sensitive work — on a conflict it resolves with the run that owns the token, so the duplicate can return the active owner to the caller. If duplicates must be rejected before a workflow body runs, keep a durable request record until native atomic start-and-hook registration exists. See [Idempotency](/docs/foundations/idempotency#run-idempotency).
|
|
56
60
|
* All arguments must be [serializable](/docs/foundations/serialization).
|
|
57
61
|
* When `deploymentId` is provided, the argument types and return type become `unknown` since there is no guarantee the workflow function's types will be consistent across different deployments.
|
|
62
|
+
* `attributes` seeds plaintext run metadata as part of creation and requires a World implementing spec version 4 or later. Keys that start with `$` are reserved for framework and library code; framework-level callers can pass `allowReservedAttributes: true` to seed reserved keys, with the same semantics as the [`experimental_setAttributes`](/docs/api-reference/workflow/experimental-set-attributes) option of the same name.
|
|
58
63
|
|
|
59
64
|
<Callout type="info">
|
|
60
65
|
If `start()` throws `'start' received an invalid workflow function. Ensure the Workflow Development Kit is configured correctly and the function includes a 'use workflow' directive.`, the passed function was not transformed as a workflow. The two most common causes are a missing `"use workflow"` directive or missing framework integration. See [start-invalid-workflow-function](/docs/errors/start-invalid-workflow-function).
|
|
@@ -78,13 +83,14 @@ import { start } from "workflow/api";
|
|
|
78
83
|
import { myWorkflow } from "./workflows/my-workflow";
|
|
79
84
|
|
|
80
85
|
const run = await start(myWorkflow, ["arg1", "arg2"], { // [!code highlight]
|
|
81
|
-
deploymentId: "custom-deployment-id" // [!code highlight]
|
|
86
|
+
deploymentId: "custom-deployment-id", // [!code highlight]
|
|
87
|
+
attributes: { source: "checkout" } // [!code highlight]
|
|
82
88
|
}); // [!code highlight]
|
|
83
89
|
```
|
|
84
90
|
|
|
85
91
|
### Using `deploymentId: "latest"`
|
|
86
92
|
|
|
87
|
-
Set `deploymentId` to `"latest"` to automatically resolve the most recent deployment for the current environment. This is useful when you want to ensure a workflow run targets the latest deployed version of your application rather than the deployment that initiated the call.
|
|
93
|
+
Set `deploymentId` to `"latest"` to automatically resolve the most recent deployment for the current environment. This is useful when you want to ensure a workflow run targets the latest deployed version of your application rather than the deployment that initiated the call. For when to use this and how it fits with default run pinning, see [Versioning](/docs/foundations/versioning).
|
|
88
94
|
|
|
89
95
|
```typescript
|
|
90
96
|
import { start } from "workflow/api";
|
|
@@ -96,7 +102,9 @@ const run = await start(myWorkflow, ["arg1", "arg2"], { // [!code highlight]
|
|
|
96
102
|
```
|
|
97
103
|
|
|
98
104
|
<Callout type="info">
|
|
99
|
-
The `deploymentId` option is currently a Vercel-specific feature.
|
|
105
|
+
The `deploymentId` option is currently a Vercel-specific feature. Other Worlds may implement this option differently to match their own deployment runtimes, and the World spec may rename it from `deploymentId` to `version` in a future SDK version. On Vercel, `"latest"` resolves to the most recent deployment matching your current environment — the same production target for production deployments, or the same git branch for preview deployments.
|
|
106
|
+
|
|
107
|
+
In Worlds without atomic, immutable deployments (such as local development or self-hosted Postgres), there is no notion of multiple deployments to resolve between, so `deploymentId: "latest"` has no effect: the SDK logs a warning and the run targets the current deployment. This means a workflow that opts into `"latest"` on Vercel still runs unchanged in local development.
|
|
100
108
|
</Callout>
|
|
101
109
|
|
|
102
110
|
<Callout type="warn">
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "workflow/astro"
|
|
3
|
+
description: Astro integration for automatic workflow bundling and route registration.
|
|
4
|
+
type: overview
|
|
5
|
+
summary: Explore the Astro integration for automatic workflow bundling and runtime support.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/getting-started/astro
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Astro integration for Workflow SDK that transforms workflow code and builds the workflow bundles.
|
|
11
|
+
|
|
12
|
+
## Functions
|
|
13
|
+
|
|
14
|
+
<Cards>
|
|
15
|
+
<Card title="workflow()" href="/docs/api-reference/workflow-astro/workflow">
|
|
16
|
+
Astro integration that transforms workflow code (`"use step"`/`"use workflow"` directives)
|
|
17
|
+
</Card>
|
|
18
|
+
</Cards>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: workflow
|
|
3
|
+
description: Configure Astro to transform workflow directives.
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Add the workflow integration to your Astro config to enable workflow directive transformation.
|
|
6
|
+
prerequisites:
|
|
7
|
+
- /docs/getting-started/astro
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
Returns an Astro integration that transforms workflow code (`"use step"`/`"use workflow"` directives) and builds the workflow bundles.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
To enable `"use step"` and `"use workflow"` directives while developing locally or deploying to production, add `workflow()` to the `integrations` array of your Astro config.
|
|
15
|
+
|
|
16
|
+
```typescript title="astro.config.mjs" lineNumbers
|
|
17
|
+
// @ts-check
|
|
18
|
+
import { defineConfig } from "astro/config";
|
|
19
|
+
import { workflow } from "workflow/astro"; // [!code highlight]
|
|
20
|
+
|
|
21
|
+
// https://astro.build/config
|
|
22
|
+
export default defineConfig({
|
|
23
|
+
integrations: [workflow()], // [!code highlight]
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The integration registers the workflow Vite transform plugins during `astro:config:setup` and builds the workflow bundles — locally during config setup, or via the Vercel builder after `astro:build:done` when deploying to Vercel.
|
|
28
|
+
|
|
29
|
+
## API Signature
|
|
30
|
+
|
|
31
|
+
### Parameters
|
|
32
|
+
|
|
33
|
+
| Parameter | Type | Description |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| `options` | `WorkflowPluginOptions` | Optional. Configures the workflow build. |
|
|
36
|
+
|
|
37
|
+
#### WorkflowPluginOptions
|
|
38
|
+
|
|
39
|
+
| Option | Type | Default | Description |
|
|
40
|
+
| --- | --- | --- | --- |
|
|
41
|
+
| `sourcemap` | `boolean \| 'inline' \| 'linked' \| 'external' \| 'both'` | `'inline'` (dev) / `false` (prod) | Controls source maps on generated workflow bundles. Accepts the same values as esbuild's `sourcemap` option. Defaults to `'inline'` in development and `false` in production (smaller function bundles — helps stay under the Vercel 250MB function size limit). Set it explicitly, or use the `WORKFLOW_SOURCEMAP` environment variable, to override in either environment. |
|
|
42
|
+
|
|
43
|
+
### Returns
|
|
44
|
+
|
|
45
|
+
Returns an `AstroIntegration` object to include in the `integrations` array of your Astro config.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: HookConflictError
|
|
3
|
+
description: Thrown when creating a hook with a token that is already in use by another workflow run.
|
|
4
|
+
type: reference
|
|
5
|
+
summary: Catch HookConflictError when a hook token is already claimed by another active workflow run.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/api-reference/workflow/create-hook
|
|
8
|
+
- /docs/foundations/hooks
|
|
9
|
+
- /docs/errors/hook-conflict
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
`HookConflictError` is thrown when creating a hook with a token that is already in use by another active workflow run. Hook tokens must be unique across all running workflows — see the [hook-conflict](/docs/errors/hook-conflict) error guide for resolution strategies.
|
|
13
|
+
|
|
14
|
+
```typescript lineNumbers
|
|
15
|
+
import { HookConflictError } from "workflow/errors"
|
|
16
|
+
declare function startApprovalWorkflow(token: string): Promise<void>; // @setup
|
|
17
|
+
declare const token: string; // @setup
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
await startApprovalWorkflow(token);
|
|
21
|
+
} catch (error) {
|
|
22
|
+
if (HookConflictError.is(error)) { // [!code highlight]
|
|
23
|
+
console.error(
|
|
24
|
+
`Token "${error.token}" already in use by run ${error.conflictingRunId}`
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## API Signature
|
|
31
|
+
|
|
32
|
+
### Properties
|
|
33
|
+
|
|
34
|
+
<TSDoc
|
|
35
|
+
definition={`
|
|
36
|
+
interface HookConflictError {
|
|
37
|
+
/** The hook token that conflicted. */
|
|
38
|
+
token: string;
|
|
39
|
+
/** The run ID of the workflow currently holding the token, when known. */
|
|
40
|
+
conflictingRunId?: string;
|
|
41
|
+
/** The error message. */
|
|
42
|
+
message: string;
|
|
43
|
+
}
|
|
44
|
+
export default HookConflictError;`}
|
|
45
|
+
/>
|
|
46
|
+
|
|
47
|
+
### Static Methods
|
|
48
|
+
|
|
49
|
+
#### `HookConflictError.is(value)`
|
|
50
|
+
|
|
51
|
+
Type-safe check for `HookConflictError` instances. Preferred over `instanceof` because it works across module boundaries and VM contexts.
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
import { HookConflictError } from "workflow/errors"
|
|
55
|
+
declare const error: unknown; // @setup
|
|
56
|
+
|
|
57
|
+
if (HookConflictError.is(error)) {
|
|
58
|
+
// error is typed as HookConflictError
|
|
59
|
+
}
|
|
60
|
+
```
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "workflow/errors"
|
|
3
|
+
description: Semantic error types thrown by the Workflow SDK and its storage backends.
|
|
4
|
+
type: overview
|
|
5
|
+
summary: Explore the error classes exported from workflow/errors for handling workflow failures.
|
|
6
|
+
related:
|
|
7
|
+
- /docs/foundations/errors-and-retries
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
API reference for the error classes exported from the `workflow/errors` package.
|
|
11
|
+
|
|
12
|
+
All errors extend [`WorkflowError`](/docs/api-reference/workflow-errors/workflow-error), so you can catch any SDK error with a single `instanceof` check, or narrow to a specific class for fine-grained handling.
|
|
13
|
+
|
|
14
|
+
## Base Classes
|
|
15
|
+
|
|
16
|
+
<Cards>
|
|
17
|
+
<Card href="/docs/api-reference/workflow-errors/workflow-error" title="WorkflowError">
|
|
18
|
+
Base class for all workflow error types.
|
|
19
|
+
</Card>
|
|
20
|
+
<Card href="/docs/api-reference/workflow-errors/workflow-world-error" title="WorkflowWorldError">
|
|
21
|
+
Base error for failures from workflow storage backends.
|
|
22
|
+
</Card>
|
|
23
|
+
</Cards>
|
|
24
|
+
|
|
25
|
+
## Registration Errors
|
|
26
|
+
|
|
27
|
+
<Cards>
|
|
28
|
+
<Card href="/docs/api-reference/workflow-errors/workflow-not-registered-error" title="WorkflowNotRegisteredError">
|
|
29
|
+
Thrown when a workflow function is not registered in the current deployment.
|
|
30
|
+
</Card>
|
|
31
|
+
<Card href="/docs/api-reference/workflow-errors/step-not-registered-error" title="StepNotRegisteredError">
|
|
32
|
+
Thrown when a step function is not registered in the current deployment.
|
|
33
|
+
</Card>
|
|
34
|
+
</Cards>
|
|
35
|
+
|
|
36
|
+
## Run Errors
|
|
37
|
+
|
|
38
|
+
<Cards>
|
|
39
|
+
<Card href="/docs/api-reference/workflow-errors/workflow-run-not-found-error" title="WorkflowRunNotFoundError">
|
|
40
|
+
Thrown when operating on a workflow run that does not exist.
|
|
41
|
+
</Card>
|
|
42
|
+
<Card href="/docs/api-reference/workflow-errors/workflow-run-failed-error" title="WorkflowRunFailedError">
|
|
43
|
+
Thrown when awaiting the return value of a failed workflow run.
|
|
44
|
+
</Card>
|
|
45
|
+
<Card href="/docs/api-reference/workflow-errors/workflow-run-cancelled-error" title="WorkflowRunCancelledError">
|
|
46
|
+
Thrown when awaiting the return value of a cancelled workflow run.
|
|
47
|
+
</Card>
|
|
48
|
+
<Card href="/docs/api-reference/workflow-errors/workflow-run-not-completed-error" title="WorkflowRunNotCompletedError">
|
|
49
|
+
Thrown when requesting the result of a workflow run that has not completed yet.
|
|
50
|
+
</Card>
|
|
51
|
+
<Card href="/docs/api-reference/workflow-errors/workflow-runtime-error" title="WorkflowRuntimeError">
|
|
52
|
+
Thrown when the workflow runtime encounters an execution error, such as serialization failures or timeouts.
|
|
53
|
+
</Card>
|
|
54
|
+
<Card href="/docs/api-reference/workflow-errors/run-expired-error" title="RunExpiredError">
|
|
55
|
+
Thrown when a workflow run has expired and can no longer be operated on.
|
|
56
|
+
</Card>
|
|
57
|
+
<Card href="/docs/api-reference/workflow-errors/run-not-supported-error" title="RunNotSupportedError">
|
|
58
|
+
Thrown when a workflow run requires a newer workflow spec version than the installed SDK supports.
|
|
59
|
+
</Card>
|
|
60
|
+
</Cards>
|
|
61
|
+
|
|
62
|
+
## Hook Errors
|
|
63
|
+
|
|
64
|
+
<Cards>
|
|
65
|
+
<Card href="/docs/api-reference/workflow-errors/hook-not-found-error" title="HookNotFoundError">
|
|
66
|
+
Thrown when resuming a hook that does not exist.
|
|
67
|
+
</Card>
|
|
68
|
+
<Card href="/docs/api-reference/workflow-errors/hook-conflict-error" title="HookConflictError">
|
|
69
|
+
Thrown when creating a hook with a token that is already in use by another workflow run.
|
|
70
|
+
</Card>
|
|
71
|
+
</Cards>
|
|
72
|
+
|
|
73
|
+
## Backend Errors
|
|
74
|
+
|
|
75
|
+
<Cards>
|
|
76
|
+
<Card href="/docs/api-reference/workflow-errors/throttle-error" title="ThrottleError">
|
|
77
|
+
Thrown when a request is rate-limited by the workflow backend.
|
|
78
|
+
</Card>
|
|
79
|
+
<Card href="/docs/api-reference/workflow-errors/entity-conflict-error" title="EntityConflictError">
|
|
80
|
+
Thrown when a storage operation conflicts with the current entity state.
|
|
81
|
+
</Card>
|
|
82
|
+
<Card href="/docs/api-reference/workflow-errors/too-early-error" title="TooEarlyError">
|
|
83
|
+
Thrown when a request is made before the system is ready to process it.
|
|
84
|
+
</Card>
|
|
85
|
+
</Cards>
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"title": "workflow/errors",
|
|
3
3
|
"pages": [
|
|
4
|
+
"workflow-error",
|
|
4
5
|
"hook-not-found-error",
|
|
6
|
+
"hook-conflict-error",
|
|
5
7
|
"step-not-registered-error",
|
|
6
8
|
"workflow-not-registered-error",
|
|
7
9
|
"workflow-run-not-found-error",
|
|
8
10
|
"workflow-run-failed-error",
|
|
9
11
|
"workflow-run-cancelled-error",
|
|
12
|
+
"workflow-run-not-completed-error",
|
|
13
|
+
"workflow-runtime-error",
|
|
10
14
|
"workflow-world-error",
|
|
11
15
|
"throttle-error",
|
|
12
16
|
"entity-conflict-error",
|
|
13
17
|
"run-expired-error",
|
|
18
|
+
"run-not-supported-error",
|
|
14
19
|
"too-early-error"
|
|
15
20
|
]
|
|
16
21
|
}
|