Type Alias MachineMemoryRecord

MachineMemoryRecord: OrchestrationExecutionMemoryRecord<{
    events: {
        consumed: InferArvoEvent<ArvoEvent> | null;
        produced: InferArvoEvent<ArvoEvent>[];
    };
    initEventId: string;
    machineDefinition: string | null;
    parentSubject: string | null;
    state: Snapshot<any>;
    status: string;
    subject: string;
    value: string | Record<string, any> | null;
}>

State record persisted in machine memory for orchestration execution.

Extends the base orchestration execution record with machine-specific state including XState snapshots, event history, and hierarchical orchestration context.

Type declaration

  • events: {
        consumed: InferArvoEvent<ArvoEvent> | null;
        produced: InferArvoEvent<ArvoEvent>[];
    }

    Event history from the last execution session.

    • consumed: InferArvoEvent<ArvoEvent> | null

      Event consumed by the machine in the last session

    • produced: InferArvoEvent<ArvoEvent>[]

      Events produced by the machine in the last session

  • initEventId: string

    ID of the event that initiated this orchestration workflow.

    Serves as the root identifier for tracing the complete execution chain. Used as parentid for completion events to maintain lineage back to the workflow's origin.

    • New orchestrations: set to current event's ID
    • Resumed orchestrations: retrieved from stored state
  • machineDefinition: string | null

    Serialized machine definition for debugging and inspection

  • parentSubject: string | null

    Parent orchestration subject for nested workflows.

    Enables hierarchical orchestration patterns where one orchestration spawns sub-orchestrations. When the current orchestration completes, its completion event routes back to this parent subject.

    • Root orchestrations: null
    • Nested orchestrations: parent's subject identifier
    • Source: parentSubject$$ field in initialization events
  • state: Snapshot<any>

    XState snapshot representing the complete machine state

  • status: string

    Current machine execution status.

    Common values include:

    • 'active': Machine is executing
    • 'done': Machine completed successfully
    • 'error': Machine encountered an error
    • 'stopped': Machine was explicitly stopped

    Custom values can be defined in the state machine configuration.

  • subject: string

    Unique identifier for this orchestration instance

  • value: string | Record<string, any> | null

    Current state value (string for simple states, object for compound states)