@cfxlabsinc/b2b-services
    Preparing search index...

    Starts a report workflow for one explicitly chosen period.

    Distinct from TemporalScheduleAdminService.runNow, which triggers the schedule — and a scheduled report resolves its own period (the last complete month, yesterday), so a trigger can only ever produce the period the workflow picks. Backfilling a month Dart never received, or re-sending one that was wrong, needs the period to come from the operator instead.

    Generic over the report registry rather than bound to Dart: the caller passes the workflow type, and a report opts in by declaring one. The second report that needs a backfill costs a registry field, not another service.

    Index
    • Parameters

      • __namedParameters: {
            internalEventPublisher: InternalEventPublisher;
            temporalClient: TemporalWorkflowClient;
            temporalTaskQueue: string;
        }

      Returns ReportRunAdminService

    instance: (...args: []) => ReportRunAdminService = ...

    The process default: reports run in background-, on its worker's queue.

    • Run a month-period report for reportMonth (YYYY-MM).

      The workflow id is derived from the report and the month, so a month has at most one run in flight. That is the property that matters here: an operator double-clicking, or two operators backfilling the same gap, must not put two writers on one counterparty drop directory racing to rename the same filenames. A finished run's id is free again, so correcting a month is just running it a second time.

      Parameters

      • __namedParameters: {
            bankId: string;
            reportId: string;
            reportMonth: string;
            reportName: string;
            today: PlainDate;
            workflowType: string;
        }
        • bankId: string

          The bank the report is for, which owns the run's activity.

        • reportId: string
        • reportMonth: string
        • reportName: string
        • today: PlainDate

          The current date on the report's own clock; injected so it is testable.

        • workflowType: string

      Returns Promise<
          | { ok: true; value: { workflowId: string } }
          | { error: ServiceError; ok: false },
      >