Interface IOrchestrateCloudEvents<TLogic>

Describes a basic orchestration router interface, including the unique orchestrator name, the state machine logic, storage management, and optional snapshot handling.

interface IOrchestrateCloudEvents<TLogic> {
    locking?: "write" | "read-write";
    name: string;
    onSnapshot?: ((processId, snapshot) => void);
    statemachine: OrchestrationMachineWithVersion<TLogic>[];
    storageManager: ILockableStorageManager;
}

Type Parameters

  • TLogic extends AnyActorLogic

    Defines the logic type that controls the orchestration's behavior.

Hierarchy (view full)

Properties

locking?: "write" | "read-write"

Dictates the locking strategy for storage operations to manage concurrent access.

  • "write": Only write operations acquire locks.
  • "read-write": Both read and write operations acquire locks.
name: string

Unique name for the orchestrator, used in constructing event handler topics.

onSnapshot?: ((processId, snapshot) => void)

Optional function to handle snapshots, providing insights into the orchestration's state at specific points.

Type declaration

    • (processId, snapshot): void
    • Optional function to handle snapshots, providing insights into the orchestration's state at specific points.

      Parameters

      • processId: string

        Identifies the orchestration process.

      • snapshot: SnapshotFrom<TLogic>

        Captures the current state of the orchestration.

      Returns void

Param: processId

Identifies the orchestration process.

Param: snapshot

Captures the current state of the orchestration.

A list of state machine logics with their corresponding versions, dictating the orchestration's behavior.

storageManager: ILockableStorageManager

Manages state persistence of the orchestration, ensuring concurrent access control. It must adhere to the ILockableStorageManager interface from unified-serverless-storage.

Generated using TypeDoc