Graphorin API reference v0.7.0
Graphorin API reference / @graphorin/workflow / / WorkflowNode
Interface: WorkflowNode<TState>
Defined in: packages/workflow/src/types.ts:168
Pure node contract. The runtime invokes run(state, ctx) exactly once per scheduled task; the return value is converted into channel writes by the engine.
Returning a single Dispatch or an array of dispatches schedules new tasks instead of writing to channels.
Stable
Type Parameters
| Type Parameter | Default type |
|---|---|
TState extends object | Record<string, unknown> |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
name | readonly | string | - | packages/workflow/src/types.ts:169 |
retry? | readonly | WorkflowNodeRetryPolicy | Per-node bounded retry policy (D1 / workflow-03). Retries fire only for thrown failures - never for pause(...) suspensions or aborts - with exponential backoff. Overrides WorkflowConfig.nodeDefaults. Absent ⇒ no retries. | packages/workflow/src/types.ts:184 |
run | readonly | WorkflowNodeRun<TState> | - | packages/workflow/src/types.ts:170 |
timeoutMs? | readonly | number | Per-node wall-clock budget in milliseconds (D1 / workflow-03). When the body exceeds it, the task's ctx.signal aborts and the task fails with a node-timeout error. Overrides WorkflowConfig.nodeDefaults. Absent ⇒ no timeout. | packages/workflow/src/types.ts:177 |