ObjectStackObjectStack

Flow

Flow protocol schemas

Flow Node Types — built-in seed set (ADR-0018).

Historically this z.enum gated FlowNodeSchema.type, which made the

closed protocol reject any plugin-registered node type — defeating the open

runtime registry (registerNodeExecutor(type: string)). Per ADR-0018 the

gate is removed: FlowNodeSchema.type is now a validated string, checked

against the live action registry at registerFlow() time, not frozen here.

FlowNodeAction is retained as the canonical list of built-in type ids

(documentation + the seed descriptor set the engine registers at boot). It

no longer constrains authored flows — plugins extend the vocabulary.

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

PropertyTypeRequiredDescription
namestringMachine name
labelstringFlow label
descriptionstringoptional
successMessagestringoptionalToast shown when a screen flow completes (defaults to a generic "Done").
errorMessagestringoptionalToast shown when a screen flow fails (defaults to the raw error).
versionintegeroptionalVersion number
statusEnum<'draft' | 'active' | 'obsolete' | 'invalid'>optionalDeployment status
templatebooleanoptionalIs logic template (Subflow)
typeEnum<'autolaunched' | 'record_change' | 'schedule' | 'screen' | 'api'>Flow type
variablesObject[]optionalFlow variables
nodesObject[]Flow nodes
edgesObject[]Flow connections
activebooleanoptionalIs active (Deprecated: use status)
runAsEnum<'system' | 'user'>optionalExecution identity for the run: system = elevated (bypasses RLS), user = the triggering user (RLS-respecting). A schedule-triggered run has no trigger user, so under user it runs UNSCOPED (elevated) — declare system to make that explicit.
errorHandlingObjectoptionalFlow-level error handling configuration
protectionObjectoptionalPackage author protection block — lock policy for this flow.
_lockEnum<'none' | 'no-overlay' | 'no-delete' | 'full'>optionalItem-level lock — controls overlay & delete (ADR-0010).
_lockReasonstringoptionalHuman-readable reason shown when a write is refused by _lock.
_lockSourceEnum<'artifact' | 'package' | 'env-forced'>optionalLayer that set _lock (artifact | package | env-forced).
_provenanceEnum<'package' | 'org' | 'env-forced'>optionalOrigin of the item (package | org | env-forced).
_packageIdstringoptionalOwning package machine id.
_packageVersionstringoptionalOwning package version.
_lockDocsUrlstringoptionalOptional documentation link surfaced next to _lockReason.

FlowEdge

Properties

PropertyTypeRequiredDescription
idstringEdge unique ID
sourcestringSource Node ID
targetstringTarget Node ID
conditionstring | ObjectoptionalPredicate (CEL) returning boolean used for branching.
typeEnum<'default' | 'fault' | 'conditional' | 'back'>optionalConnection type: default (normal flow), fault (error path), conditional (expression-guarded), or back (ADR-0044 declared back-edge — traversed normally at run time, but excluded from DAG cycle validation so a revise/rework loop can re-enter an earlier node)
labelstringoptionalLabel on the connector
isDefaultbooleanoptionalMarks this edge as the default path when no other conditions match

FlowNode

Properties

PropertyTypeRequiredDescription
idstringNode unique ID
typestringAction type — a built-in FlowNodeAction id or a plugin-registered node type. Validated against the live action registry at registerFlow() (ADR-0018), not by a closed enum.
labelstringNode label
configRecord<string, any>optionalNode configuration
connectorConfigObjectoptional
positionObjectoptional
timeoutMsintegeroptionalMaximum execution time for this node in milliseconds
inputSchemaRecord<string, Object>optionalInput parameter schema for this node
outputSchemaRecord<string, Object>optionalOutput schema declaration for this node
waitEventConfigObjectoptionalConfiguration for wait node event resumption
boundaryConfigObjectoptionalConfiguration for boundary events attached to host nodes

FlowNodeAction

Allowed Values

  • start
  • end
  • decision
  • assignment
  • loop
  • create_record
  • update_record
  • delete_record
  • get_record
  • http
  • notify
  • script
  • screen
  • wait
  • subflow
  • map
  • connector_action
  • parallel_gateway
  • join_gateway
  • boundary_event

FlowVariable

Properties

PropertyTypeRequiredDescription
namestringVariable name
typestringData type (text, number, boolean, object, list)
isInputbooleanIs input parameter
isOutputbooleanIs output parameter

FlowVersionHistory

Properties

PropertyTypeRequiredDescription
flowNamestringFlow machine name
versionintegerVersion number
definitionObjectComplete flow definition snapshot
createdAtstringWhen this version was created
createdBystringoptionalUser who created this version
changeNotestringoptionalDescription of what changed in this version

On this page