Class StoreService<Provider, TransactionProvider>Abstract

Type Parameters

Constructors

Properties

appId: string
cache: Cache
logger: ILogger
namespace: string
serializer: SerializerService
storeClient: Provider

Methods

  • Parameters

    • id: string
    • version: string

    Returns Promise<boolean>

  • Parameters

    • topic: string
    • resolved: string

    Returns Promise<number>

  • Parameters

    • workItemKey: string
    • key: string
    • processedKey: string
    • Optionalscrub: boolean

    Returns Promise<void>

  • Parameters

    • key: string
    • target: string

    Returns Promise<void>

  • Parameters

    • jobId: string
    • OptionalfieldMatchPattern: string
    • Optionallimit: number
    • OptionalbatchSize: number
    • Optionalcursor: string

    Returns Promise<[string, StringStringType]>

  • Parameters

    • OptionalqueryString: string
    • Optionallimit: number
    • OptionalbatchSize: number
    • Optionalcursor: string

    Returns Promise<[string, string[]]>

  • Fetch activity inputs for a workflow. Used by the exporter to enrich timeline events with activity arguments.

    Parameters

    • workflowId: string

      The workflow ID

    • symbolField: string

      The compressed symbol field for activity arguments

    Returns Promise<{
        byJobId: Map<string, any>;
        byNameIndex: Map<string, any>;
    }>

    Map of job_id -> parsed input arguments and activityName:index -> parsed inputs

  • Parameters

    • id: string
    • Optionalrefresh: boolean

    Returns Promise<any>

  • Fetch child workflow inputs in batch. Used by the exporter to enrich child workflow events with their arguments.

    Parameters

    • childJobKeys: string[]

      Array of child job keys to fetch

    • symbolField: string

      The compressed symbol field for workflow arguments

    Returns Promise<Map<string, any>>

    Map of child_workflow_id -> parsed input arguments

  • Leg2: Atomically gets the hook signal OR inserts a pending signal if no hook is registered yet (early signal). Returns the hook signal value, or undefined if we stored a pending signal instead.

    Parameters

    • topic: string
    • resolved: string
    • OptionalpendingData: string
    • OptionalpendingExpire: number

    Returns Promise<string>

  • Fetch job record and attributes by key. Used by the exporter to reconstruct execution history for expired jobs.

    Parameters

    • jobKey: string

      The job key (e.g., "hmsh:durable:j:workflowId")

    Returns Promise<{
        attributes: Record<string, string>;
        job: {
            created_at: Date;
            expired_at?: Date;
            id: string;
            is_live: boolean;
            key: string;
            status: number;
            updated_at: Date;
        };
    }>

    Job row and all attributes

  • Parameters

    • OptionallistKey: string

    Returns Promise<boolean | [listKey: string, jobId: string, gId: string, activityId: string, type: WorkListTaskType]>

  • Parameters

    • jobId: string
    • appId: string

    Returns Promise<number>

  • Fetch stream message history for a job from worker_streams. Returns raw activity input/output data from soft-deleted messages.

    Parameters

    • jobId: string

      The job ID (metadata.jid in stream messages)

    • Optionaloptions: {
          activity?: string;
          types?: string[];
      }

      Optional filters for activity or message types

      • Optionalactivity?: string
      • Optionaltypes?: string[]

    Returns Promise<StreamHistoryEntry[]>

    Array of stream history entries ordered by creation time

  • Parameters

    • topic: string
    • jobId: string
    • options: {
          [key: string]: any;
      }
      • [key: string]: any

    Returns Promise<void>

  • Parameters

    • sourceKey: string
    • destinationKey: string

    Returns Promise<any>

  • Parameters

    • target: string
    • size: number
    • type: "JOB" | "ACTIVITY"
    • OptionaltryCount: number

    Returns Promise<[number, number, Symbols]>

  • Leg1: Attempts to set the hook signal. If a pending signal occupies the key (race condition), overwrites it and returns the pending data. When called with a transaction, queues the setnxex (no pending detection).

    Parameters

    Returns Promise<{
        pendingData?: string;
        success: boolean;
    }>

  • Parameters

    • jobId: string
    • appId: string
    • Optionalstatus: number
    • Optionalentity: string
    • Optionaltransaction: ProviderTransaction

    Returns Promise<boolean>

  • Parameters

    Returns Promise<any>

  • Parameters

    • statusDelta: number
    • threshold: number
    • jobId: string
    • appId: string
    • guidField: string
    • guidWeight: number
    • Optionaltransaction: ProviderTransaction

    Returns Promise<any>

  • Parameters

    • subscriptions: Record<string, any>
    • appVersion: AppVID

    Returns Promise<boolean>

  • Parameters

    • transitions: Record<string, any>
    • appVersion: AppVID

    Returns Promise<any>