ObjectStackObjectStack

Execution

Execution protocol schemas

Automation Execution Protocol

Defines schemas for execution logging, error tracking, checkpointing,

concurrency control, and scheduled execution persistence.

Industry alignment: Salesforce Flow Interviews, Temporal Workflow History,

AWS Step Functions execution logs.

Source: packages/spec/src/automation/execution.zod.ts

TypeScript Usage

import { Checkpoint, ConcurrencyPolicy, ExecutionError, ExecutionErrorSeverity, ExecutionLog, ExecutionStatus, ExecutionStepLog, ScheduleState } from '@objectstack/spec/automation';
import type { Checkpoint, ConcurrencyPolicy, ExecutionError, ExecutionErrorSeverity, ExecutionLog, ExecutionStatus, ExecutionStepLog, ScheduleState } from '@objectstack/spec/automation';

// Validate data
const result = Checkpoint.parse(data);

Checkpoint

Properties

PropertyTypeRequiredDescription
idstringCheckpoint ID
executionIdstringParent execution ID
flowNamestringFlow machine name
currentNodeIdstringNode ID where execution is paused
variablesRecord<string, any>Flow variable state at checkpoint
completedNodeIdsstring[]List of node IDs already executed
createdAtstringCheckpoint creation timestamp
expiresAtstringoptionalCheckpoint expiration (auto-cleanup)
reasonEnum<'wait' | 'screen_input' | 'approval' | 'error' | 'manual_pause' | 'parallel_join' | 'boundary_event'>Why the execution was checkpointed

ConcurrencyPolicy

Properties

PropertyTypeRequiredDescription
maxConcurrentintegerMaximum number of concurrent executions allowed
onConflictEnum<'queue' | 'reject' | 'cancel_existing'>queue = enqueue for later, reject = fail immediately, cancel_existing = stop running instance
lockScopeEnum<'global' | 'per_record' | 'per_user'>Scope of the concurrency lock
queueTimeoutMsintegeroptionalMaximum time to wait in queue before timing out (ms)

ExecutionError

Properties

PropertyTypeRequiredDescription
idstringError record ID
executionIdstringParent execution ID
nodeIdstringoptionalNode where the error occurred
severityEnum<'warning' | 'error' | 'critical'>Error severity level
codestringMachine-readable error code
messagestringHuman-readable error message
stackstringoptionalStack trace for debugging
contextRecord<string, any>optionalAdditional diagnostic context (input data, config snapshot)
timestampstringWhen the error occurred
retryablebooleanWhether this error can be retried
resolvedAtstringoptionalWhen the error was resolved (e.g., after successful retry)

ExecutionErrorSeverity

Allowed Values

  • warning
  • error
  • critical

ExecutionLog

Properties

PropertyTypeRequiredDescription
idstringExecution instance ID
flowNamestringMachine name of the executed flow
flowVersionintegeroptionalVersion of the flow that was executed
statusEnum<'pending' | 'running' | 'paused' | 'completed' | 'failed' | 'cancelled' | 'timed_out' | 'retrying'>Current execution status
triggerObjectWhat triggered this execution
stepsObject[]Ordered list of executed steps
variablesRecord<string, any>optionalFinal state of flow variables
startedAtstringExecution start timestamp
completedAtstringoptionalExecution completion timestamp
durationMsintegeroptionalTotal execution duration in milliseconds
runAsEnum<'system' | 'user'>optionalExecution context identity
tenantIdstringoptionalTenant ID for multi-tenant isolation

ExecutionStatus

Allowed Values

  • pending
  • running
  • paused
  • completed
  • failed
  • cancelled
  • timed_out
  • retrying

ExecutionStepLog

Properties

PropertyTypeRequiredDescription
nodeIdstringNode ID that was executed
nodeTypestringNode action type (e.g., "decision", "http_request")
nodeLabelstringoptionalHuman-readable node label
statusEnum<'success' | 'failure' | 'skipped'>Step execution result
startedAtstringWhen the step started
completedAtstringoptionalWhen the step completed
durationMsintegeroptionalStep execution duration in milliseconds
inputRecord<string, any>optionalInput data passed to the node
outputRecord<string, any>optionalOutput data produced by the node
errorObjectoptionalError details if step failed
retryAttemptintegeroptionalRetry attempt number (0 = first try)

ScheduleState

Properties

PropertyTypeRequiredDescription
idstringSchedule instance ID
flowNamestringFlow machine name
cronExpressionstringCron expression (e.g., "0 9 * * MON-FRI")
timezonestringIANA timezone for cron evaluation
statusEnum<'active' | 'paused' | 'disabled' | 'expired'>Current schedule status
nextRunAtstringoptionalNext scheduled execution timestamp
lastRunAtstringoptionalLast execution timestamp
lastExecutionIdstringoptionalExecution ID of the last run
lastRunStatusEnum<'pending' | 'running' | 'paused' | 'completed' | 'failed' | 'cancelled' | 'timed_out' | 'retrying'>optionalStatus of the last run
totalRunsintegerTotal number of executions
consecutiveFailuresintegerConsecutive failed executions
startDatestringoptionalSchedule effective start date
endDatestringoptionalSchedule expiration date
maxRunsintegeroptionalMaximum total executions before auto-disable
createdAtstringSchedule creation timestamp
updatedAtstringoptionalLast update timestamp
createdBystringoptionalUser who created the schedule

On this page