Skip to content

ATS-PFM-MTD-015Deliver Committed Record and Link Events: Capability Test Specification

Markdown

ATS-PFM-MTD-015

Deliver Committed Record and Link Events: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleMetadata and Organization-defined RecordsRevision2

Read atservices-platform ad3f6a65react-console baf6dae3

Coverage

  • Rule covered
  • Transition gap: FND-PFM-MTD-077
  • Validation covered
  • Permission gap: FND-PFM-MTD-077
  • Edge covered
  • Failure covered
  • Boundary gap: FND-PFM-MTD-077
  • Concurrency gap: FND-PFM-MTD-077
  • Invariant covered
  • Interaction covered

Test Scenarios

8 scenarios proving CAP-PFM-MTD-015; 7 bound to an existing test.

01 Committed writes and rollback have different event effectsinvariantapinegativetest
Proves
BR-CAP-PFM-MTD-015-01 INV-DOM-PFM-MTD-005-10
Preconditions
Valid record operations and a rejected write are available.
Steps
[ { "do": "Create, edit and perform lifecycle actions, then roll back or reject a write.", "provenance": "test", "source": "services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes nothing when the transaction that wrote the record rolls back, in the ledger or the queue" } ]
Expected
Committed operations leave their event and waiting work while failed transactions leave neither.
Data
Valid record operations and a rejected write are available.
Bound to
services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes nothing when the transaction that wrote the record rolls back, in the ledger or the queue
services-platform:modules/associations/tests/integration/services/persistence/associations.events.integration.spec.js#publishes objects.association.deleted for a delete, with the association as it was
Source
services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes nothing when the transaction that wrote the record rolls back, in the ledger or the queue
02 Update payloads identify changed keysruleapitest
Proves
BR-CAP-PFM-MTD-015-02
Preconditions
A boat has several property values.
Steps
[ { "do": "Change two properties and inspect its update event.", "provenance": "test", "source": "services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes objects.record.updated naming the properties whose value changed, sorted" } ]
Expected
The event identifies the record and actor and lists the changed property keys in sorted order.
Data
A boat has several property values.
Bound to
services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#carries the declared payload: the identifiers, the number with its prefix, the display name and the state
services-platform:modules/custom-objects/tests/e2e/business-events.e2e.spec.js#names the signed caller as its actor, the one the record names as its creator
Source
services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes objects.record.updated naming the properties whose value changed, sorted
03 No-op mutations do not announce new factsedgeapitest
Proves
BR-CAP-PFM-MTD-015-03
Preconditions
A record and relationship already have their current values.
Steps
[ { "do": "Repeat property and publication values, change only external identity and update link notes.", "provenance": "test", "source": "services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes nothing for an update that changes no property’s value" } ]
Expected
No new business event is appended for these cases.
Data
A record and relationship already have their current values.
Bound to
Source
services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes nothing for an update that changes no property’s value
04 Dispatch retains work until destinations acceptfailureapinegativetest
Proves
BR-CAP-PFM-MTD-015-04
Preconditions
A ledger event has one or more interested destinations.
Steps
[ { "do": "Dispatch with acceptance and with a refused send, then dispatch an unwanted event.", "provenance": "test", "source": "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" } ]
Expected
Accepted work is removed, refused work remains retryable and the ledger fact is retained; unwanted work produces no message.
Data
A ledger event has one or more interested destinations.
Bound to
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
Source
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
05 Delivery retries only the failed destinationfailureapinegativetest
Proves
BR-CAP-PFM-MTD-015-05
Preconditions
A consumer receives multiple destination messages.
Steps
[ { "do": "Accept one and refuse another.", "provenance": "test", "source": "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" } ]
Expected
Only the failed message is reported for redelivery and destination contracts use the appropriate shape.
Data
A consumer receives multiple destination messages.
Bound to
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
Source
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
06 Cascade announcements retain dependency orderinteractionapitest
Proves
BR-CAP-PFM-MTD-015-07
Preconditions
A deletion affects a linked cascade.
Steps
[ { "do": "Delete and inspect events.", "provenance": "test", "source": "services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes the deletion of the record a cascade takes, with its own object’s number, and the association’s" } ]
Expected
Every dependent link and record deletion is announced before its owner deletion.
Data
A deletion affects a linked cascade.
Bound to
services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes the deletion of the record a cascade takes, with its own object’s number, and the association’s
Source
services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes the deletion of the record a cascade takes, with its own object’s number, and the association’s
07 Invalid retention cannot run a sweepvalidationapinegativetest
Proves
BR-CAP-PFM-MTD-015-09
Preconditions
The ledger exists.
Steps
[ { "do": "Request a zero-day retention sweep.", "provenance": "test", "source": "services-platform:modules/custom-objects/tests/integration/services/persistence/business-events.integration.spec.js#refuses a retention shorter than a day" } ]
Expected
The sweep refuses the duration.
Data
The ledger exists.
Bound to
Source
services-platform:modules/custom-objects/tests/integration/services/persistence/business-events.integration.spec.js#refuses a retention shorter than a day
08 A committed cascade leaves ordered delivery factsinteractionapiproposed
Proves
BR-CAP-PFM-MTD-015-01 BR-CAP-PFM-MTD-015-07 BR-CAP-PFM-MTD-013-06
Preconditions
A custom root reaches dependent records through cascading links.
Steps
[ { "do": "Delete the root in a transaction, inspect ledger order and roll back a second comparable deletion.", "provenance": "proposed", "source": [ "services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes nothing when the transaction that wrote the record rolls back, in the ledger or the queue", "services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes the deletion of the record a cascade takes, with its own object’s number, and the association’s", "services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#writes every dependant’s event before the record it depended on: the associations, then the cascade deepest first (B1)" ] } ]
Expected
Compare ledger and queue facts with record and link outcomes.
Data
A custom root reaches dependent records through cascading links.
Source
services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes nothing when the transaction that wrote the record rolls back, in the ledger or the queue,services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes the deletion of the record a cascade takes, with its own object’s number, and the association’s,services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#writes every dependant’s event before the record it depended on: the associations, then the cascade deepest first (B1)

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.