Type Alias MachineMemoryRecord

MachineMemoryRecord: {
    consumed: ArvoEvent[];
    machineDefinition: string | null;
    parentSubject: string | null;
    produced: {
        allEventDomains: string[];
        domainedEvents: {
            all: ArvoEvent[];
        } & Partial<Record<string, ArvoEvent[]>>;
        events: ArvoEvent[];
    };
    state: Snapshot<any>;
    status: string;
    subject: string;
    value: string | Record<string, any> | null;
}

Represents the state record stored in machine memory.

Type declaration

  • consumed: ArvoEvent[]

    The event consumed by the machine in the last session

  • machineDefinition: string | null

    Machine definition string

  • parentSubject: string | null

    Optional reference to parent orchestration subject

  • produced: {
        allEventDomains: string[];
        domainedEvents: {
            all: ArvoEvent[];
        } & Partial<Record<string, ArvoEvent[]>>;
        events: ArvoEvent[];
    }

    Rvents produced by the machine in the last session

    • allEventDomains: string[]
    • domainedEvents: {
          all: ArvoEvent[];
      } & Partial<Record<string, ArvoEvent[]>>
    • events: ArvoEvent[]
  • state: Snapshot<any>

    XState snapshot representing the machine's current state

  • status: string

    Current execution status of the machine. The status field represents the current state of the machine's lifecycle. While commonly used values are:

    • 'active': Machine is currently executing
    • 'done': Machine has completed its execution successfully
    • 'error': Machine encountered an error during execution
    • 'stopped': Machine execution was explicitly stopped

    Due to XState dependency, the status can be any string value defined in the state machine definition. This allows for custom states specific to the business logic implemented in the state machine.

  • subject: string

    Unique identifier for the machine instance

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

    Current value stored in the machine state