---
id: TST-PFM-MTD-056
title: business events
kind: integration
product_area: platform
module: metadata
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js
implements:
  - ATS-PFM-MTD-015-04
  - ATS-PFM-MTD-015-05
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: >-
  Prepared integration database and the suite fixture records; fixture teardown restores or removes its own
  rows.
evidence:
  - >-
    services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js
  - >-
    services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#sends
    one message per destination of the event: the native subscriber and the router
  - >-
    services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#carries
    the whole envelope: the key, the tenant, the subject, the scope, the provenance and the declared payload
  - >-
    services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#deletes
    the queue row SQS accepted every message of
  - >-
    services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#keeps
    the ledger row: the fact outlives its delivery
  - >-
    services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#answers
    what it claimed and sent, its own event among them
  - >-
    services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#sends
    no message for it
  - >-
    services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#deletes
    its queue row where it stands
  - >-
    services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#tried
    to send it (the premise)
  - >-
    services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#keeps
    its queue row, claimed, for the next run to offer again
  - >-
    services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#hands
    the native subscriber the envelope itself
  - >-
    services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#hands
    the router its contract: version 1, the stream, the envelope
  - >-
    services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#answers
    no failure when every destination took its message
  - >-
    services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#answers
    the one message whose destination refused, so SQS offers that one again
fixture_imports:
  - drizzle-orm
  - '@rhythmsoftware/macroservice-testing/stage'
  - '@rhythmsoftware/macroservice-testing/execution-context'
  - '@rhythmsoftware/macroservice-events/subscriber-source'
  - '@rhythmsoftware/macroservice-events/arn-resolver'
  - ../../../../db/business-event-queue.table
  - ../../../../services/persistence/custom-object-records
  - ../../../../services/dispatch/business-events
  - ../../support
  - ../../business-events
test_doubles:
  - 'Recording queue client, in-memory destinations and destination invocation seams.'
limitations: []
unmatched_specification: null
binding_assertions:
  - scenario: ATS-PFM-MTD-015-04
    provenance: test
    source:
      - >-
        services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#sends
        one message per destination of the event: the native subscriber and the router
      - >-
        services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#keeps
        the ledger row: the fact outlives its delivery
      - >-
        services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#keeps
        its queue row, claimed, for the next run to offer again
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
  - scenario: ATS-PFM-MTD-015-05
    provenance: test
    source:
      - >-
        services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#hands
        the native subscriber the envelope itself
      - >-
        services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#hands
        the router its contract: version 1, the stream, the envelope
      - >-
        services-platform:modules/custom-objects/tests/integration/services/dispatch/business-events.integration.spec.js#answers
        the one message whose destination refused, so SQS offers that one again
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
---

# Business events

## Verification Boundary

This integration suite checks custom objects and records within the local test harness. The registered file and pinned revision define its boundary.

## What This Suite Proves

The bindings identify the detailed or feature scenarios whose outcomes have assertions in this suite. Original case references remain attached to the detailed scenarios so a reviewer can inspect the exact assertion. Assertions are evidence of implemented checks; no execution result is claimed.

## What It Does Not Prove

The register does not establish a current passing run or full specification conformance. Behavior outside the suite’s fixtures and assertions remains unverified.

## Real Dependencies and Test Doubles

The fixture uses PostgreSQL and the imported persistence or API code. Recording queue client, in-memory destinations and destination invocation seams.

## Must Not Be Doubled

The operation under examination and its asserted stored outcomes must remain real within the declared harness. A fixture cannot replace the write, refusal or transactional effect that the bound scenario checks.
