Flow
Flow protocol schemas
Flow Node Types
Source: packages/spec/src/automation/flow.zod.ts
TypeScript Usage
import { Flow, FlowEdge, FlowNode, FlowNodeAction, FlowVariable, FlowVersionHistory } from '@objectstack/spec/automation';
import type { Flow, FlowEdge, FlowNode, FlowNodeAction, FlowVariable, FlowVersionHistory } from '@objectstack/spec/automation';
// Validate data
const result = Flow.parse(data);Flow
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | ✅ | Machine name |
| label | string | ✅ | Flow label |
| description | string | optional | |
| version | integer | ✅ | Version number |
| status | Enum<'draft' | 'active' | 'obsolete' | 'invalid'> | ✅ | Deployment status |
| template | boolean | ✅ | Is logic template (Subflow) |
| type | Enum<'autolaunched' | 'record_change' | 'schedule' | 'screen' | 'api'> | ✅ | Flow type |
| variables | Object[] | optional | Flow variables |
| nodes | Object[] | ✅ | Flow nodes |
| edges | Object[] | ✅ | Flow connections |
| active | boolean | ✅ | Is active (Deprecated: use status) |
| runAs | Enum<'system' | 'user'> | ✅ | Execution context |
| errorHandling | Object | optional | Flow-level error handling configuration |
FlowEdge
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | ✅ | Edge unique ID |
| source | string | ✅ | Source Node ID |
| target | string | ✅ | Target Node ID |
| condition | string | optional | Expression returning boolean used for branching |
| type | Enum<'default' | 'fault' | 'conditional'> | ✅ | Connection type: default (normal flow), fault (error path), or conditional (expression-guarded) |
| label | string | optional | Label on the connector |
| isDefault | boolean | ✅ | Marks this edge as the default path when no other conditions match |
FlowNode
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | ✅ | Node unique ID |
| type | Enum<'start' | 'end' | 'decision' | 'assignment' | 'loop' | 'create_record' | 'update_record' | 'delete_record' | 'get_record' | 'http_request' | 'script' | 'screen' | 'wait' | 'subflow' | 'connector_action' | 'parallel_gateway' | 'join_gateway' | 'boundary_event'> | ✅ | Action type |
| label | string | ✅ | Node label |
| config | Record<string, any> | optional | Node configuration |
| connectorConfig | Object | optional | |
| position | Object | optional | |
| timeoutMs | integer | optional | Maximum execution time for this node in milliseconds |
| inputSchema | Record<string, Object> | optional | Input parameter schema for this node |
| outputSchema | Record<string, Object> | optional | Output schema declaration for this node |
| waitEventConfig | Object | optional | Configuration for wait node event resumption |
| boundaryConfig | Object | optional | Configuration for boundary events attached to host nodes |
FlowNodeAction
Allowed Values
startenddecisionassignmentloopcreate_recordupdate_recorddelete_recordget_recordhttp_requestscriptscreenwaitsubflowconnector_actionparallel_gatewayjoin_gatewayboundary_event
FlowVariable
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | ✅ | Variable name |
| type | string | ✅ | Data type (text, number, boolean, object, list) |
| isInput | boolean | ✅ | Is input parameter |
| isOutput | boolean | ✅ | Is output parameter |
FlowVersionHistory
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| flowName | string | ✅ | Flow machine name |
| version | integer | ✅ | Version number |
| definition | Object | ✅ | Complete flow definition snapshot |
| createdAt | string | ✅ | When this version was created |
| createdBy | string | optional | User who created this version |
| changeNote | string | optional | Description of what changed in this version |