ObjectStackObjectStack

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

PropertyTypeRequiredDescription
namestringMachine name
labelstringFlow label
descriptionstringoptional
versionintegerVersion number
statusEnum<'draft' | 'active' | 'obsolete' | 'invalid'>Deployment status
templatebooleanIs logic template (Subflow)
typeEnum<'autolaunched' | 'record_change' | 'schedule' | 'screen' | 'api'>Flow type
variablesObject[]optionalFlow variables
nodesObject[]Flow nodes
edgesObject[]Flow connections
activebooleanIs active (Deprecated: use status)
runAsEnum<'system' | 'user'>Execution context
errorHandlingObjectoptionalFlow-level error handling configuration

FlowEdge

Properties

PropertyTypeRequiredDescription
idstringEdge unique ID
sourcestringSource Node ID
targetstringTarget Node ID
conditionstringoptionalExpression returning boolean used for branching
typeEnum<'default' | 'fault' | 'conditional'>Connection type: default (normal flow), fault (error path), or conditional (expression-guarded)
labelstringoptionalLabel on the connector
isDefaultbooleanMarks this edge as the default path when no other conditions match

FlowNode

Properties

PropertyTypeRequiredDescription
idstringNode unique ID
typeEnum<'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
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_request
  • script
  • screen
  • wait
  • subflow
  • 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