Orchestrates state machine execution and lifecycle management. Handles machine resolution, state management, event processing and error handling.

Hierarchy (view full)

Constructors

Properties

executionEngine: IMachineExectionEngine
executionunits: number
syncEventResource: SyncEventResource<MachineMemoryRecord>
systemErrorDomain?: (null | string)[] = []

Accessors

  • get source(): any
  • Unique identifier for the event handler source system

    Returns any

  • get systemErrorSchema(): ArvoContractRecord
  • Gets the error schema for this orchestrator

    Returns ArvoContractRecord

Methods

  • Creates emittable event from execution result

    Parameters

    • event: EnqueueArvoEventActionParam

      Source event to emit

    • machine: ArvoMachine<any, any, any, any, any>

      Machine that generated event

    • otelHeaders: OpenTelemetryHeaders

      OpenTelemetry headers

    • orchestrationParentSubject: null | string

      Parent orchestration subject

    • sourceEvent: ArvoEvent<Record<string, any>, Record<string,
          | null
          | string
          | number
          | boolean>, string>

      Original triggering event

    • initEventId: string

      The id of the event which initiated the orchestration in the first place

    • _domain: null | string

      The domain of the event.

    Returns ArvoEvent<Record<string, any>, Record<string,
        | null
        | string
        | number
        | boolean>, string>

    On schema/contract mismatch

    On invalid parentSubject$$ format

  • Core orchestration method that executes state machines in response to events.

    Parameters

    • event: ArvoEvent<Record<string, any>, Record<string,
          | null
          | string
          | number
          | boolean>, string>

      Event triggering the execution

    • opentelemetry: ArvoEventHandlerOpenTelemetryOptions = ...

      OpenTelemetry configuration

    Returns Promise<{
        events: ArvoEvent<Record<string, any>, Record<string,
            | null
            | string
            | number
            | boolean>, string>[];
    }>

    Object containing domained events

    Lock/state operations failed

    Invalid event structure/flow

    Schema/contract mismatch

    Missing/invalid machine version