Skip to content

ATS-PFM-MTD-013Retire or Publish Custom Records: Capability Test Specification

Markdown

ATS-PFM-MTD-013

Retire or Publish Custom Records: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleMetadata and Organization-defined RecordsRevision2

Read atservices-platform ad3f6a65react-console baf6dae3

Coverage

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

Test Scenarios

11 scenarios proving CAP-PFM-MTD-013; 9 bound to an existing test.

01 Publication state tracks publication timeruleapinegativetest
Proves
BR-CAP-PFM-MTD-013-01 INV-DOM-PFM-MTD-005-05
Preconditions
A publishable record and a nonpublishable object exist.
Steps
[ { "do": "Publish, move to another state and try publishing the nonpublishable record.", "provenance": "test", "source": "services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#refuses publication on an object that is not publishable" } ]
Expected
Time is populated during publication and cleared outside it; unsupported publication fails.
Data
A publishable record and a nonpublishable object exist.
Bound to
Source
services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#refuses publication on an object that is not publishable
02 Archival retains information until restorationtransitionapinegativetest
Proves
BR-CAP-PFM-MTD-013-02
Preconditions
A record has values, files and links.
Steps
[ { "do": "Archive it, list records, try archival again and restore it.", "provenance": "test", "source": "services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#archives a record with everything kept" } ]
Expected
Ordinary browsing excludes it, data remains, repeated archival fails and restoration returns the retained information.
Data
A record has values, files and links.
Bound to
Source
services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#archives a record with everything kept
03 Deletion removes owned storage and retires file attachmentstransitionapinegativetest
Proves
BR-CAP-PFM-MTD-013-03
Preconditions
A record has values, unique reservations and files.
Steps
[ { "do": "Delete at its current version.", "provenance": "test", "source": "services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#deletes a record with its values and unique values" } ]
Expected
Record and owned rows disappear and files are detached for retirement.
Data
A record has values, unique reservations and files.
Bound to
Source
services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#deletes a record with its values and unique values
04 Restrict prevents deletion while protection is in forcefailureapinegativetest
Proves
BR-CAP-PFM-MTD-013-04
Preconditions
A record has an open restricting link.
Steps
[ { "do": "Try deleting the protected record.", "provenance": "test", "source": "services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#refuses to delete a record an open restricting association names, and removes nothing" } ]
Expected
The deletion fails and removes nothing.
Data
A record has an open restricting link.
Bound to
services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#refuses to delete a record an open restricting association names, and removes nothing
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#refuses while the restricting association has an end date that has not passed, removing nothing
Source
services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#refuses to delete a record an open restricting association names, and removes nothing
05 Cascade refusal rolls back the entire deletionfailurebrowsernegativetest
Proves
BR-CAP-PFM-MTD-013-05 INV-DOM-PFM-MTD-005-08
Preconditions
A builder has boats including a protected one.
Steps
[ { "do": "Delete the builder and inspect every dependent record.", "provenance": "test", "source": "react-console:acceptance/custom-objects/playwright/journeys/PLAT-M6-S08.spec.ts#PLAT-M6-S08: an insured boat cannot be deleted and a builder's deletion takes its boats except the refused one" } ]
Expected
The refusal preserves the builder and all boats.
Data
A builder has boats including a protected one.
Bound to
react-console:acceptance/custom-objects/playwright/journeys/PLAT-M6-S08.spec.ts#PLAT-M6-S08: an insured boat cannot be deleted and a builder's deletion takes its boats except the refused one
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#refuses a chain of eleven with SQLSTATE AE409 and removes nothing of it
Source
react-console:acceptance/custom-objects/playwright/journeys/PLAT-M6-S08.spec.ts#PLAT-M6-S08: an insured boat cannot be deleted and a builder's deletion takes its boats except the refused one
06 Dependent announcements precede the root deletioninteractionapitest
Proves
BR-CAP-PFM-MTD-013-06
Preconditions
A chain has cascading records and links.
Steps
[ { "do": "Delete its root and inspect event order.", "provenance": "test", "source": "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
Link removals precede dependent record deletions and the originating deletion is last.
Data
A chain has cascading records and links.
Bound to
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)
Source
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)
07 Owner cascades ignore owned-object lifecycle statusinteractionapinegativetest
Proves
BR-CAP-PFM-MTD-013-07
Preconditions
An owner has a record whose object is archived.
Steps
[ { "do": "Delete the owner through its cascade.", "provenance": "test", "source": "services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#applies the owner’s cascade to a record of an archived custom object (B5: the rule applies whatever the type’s state)" } ]
Expected
The dependent record is removed despite its object state.
Data
An owner has a record whose object is archived.
Bound to
services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#applies the owner’s cascade to a record of an archived custom object (B5: the rule applies whatever the type’s state)
Source
services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#applies the owner’s cascade to a record of an archived custom object (B5: the rule applies whatever the type’s state)
08 Lifecycle audits record the selected actionruleapitest
Proves
BR-CAP-PFM-MTD-013-08
Preconditions
An active object has lifecycle-enabled records.
Steps
[ { "do": "Publish, archive, restore and delete and inspect audit events.", "provenance": "test", "source": "services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#records the publication and its state in the audit events" } ]
Expected
Each action is audited and publication records its resulting state.
Data
An active object has lifecycle-enabled records.
Bound to
Source
services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#records the publication and its state in the audit events
09 Record-page lifecycle actions explain refusalpermissionbrowsernegativetest
Proves
BR-CAP-PFM-MTD-013-09
Preconditions
An administrator opens an ordinary and a protected boat.
Steps
[ { "do": "Publish, archive and restore, then attempt protected deletion.", "provenance": "test", "source": "react-console:acceptance/custom-objects/playwright/journeys/PLAT-M5-S07.spec.ts#PLAT-M5-S07: publish, archive and restore from the boat page; History names each revision and who made it" } ]
Expected
Supported actions succeed and the deletion confirmation identifies the restricting link.
Data
An administrator opens an ordinary and a protected boat.
Bound to
react-console:acceptance/custom-objects/playwright/journeys/PLAT-M5-S07.spec.ts#PLAT-M5-S07: publish, archive and restore from the boat page; History names each revision and who made it
react-console:acceptance/custom-objects/playwright/journeys/PLAT-M6-S08.spec.ts#PLAT-M6-S08: an insured boat cannot be deleted and a builder's deletion takes its boats except the refused one
Source
react-console:acceptance/custom-objects/playwright/journeys/PLAT-M5-S07.spec.ts#PLAT-M5-S07: publish, archive and restore from the boat page; History names each revision and who made it
10 A refused cascade preserves records and their evidenceinteractionapiproposed
Proves
BR-CAP-PFM-MTD-013-05 BR-CAP-PFM-MTD-014-01 BR-CAP-PFM-MTD-015-01 BR-CAP-PFM-MTD-019-04
Preconditions
A root reaches two custom records and one has a restricting link.
Steps
[ { "do": "Attempt root deletion, compare record values, revisions and events, remove the restriction and retry.", "provenance": "proposed", "source": [ "react-console:acceptance/custom-objects/playwright/journeys/PLAT-M6-S08.spec.ts#PLAT-M6-S08: an insured boat cannot be deleted and a builder's deletion takes its boats except the refused one", "services-platform:modules/custom-objects/tests/integration/services/history/custom-object-record-history.integration.spec.js#answers the association, the update and the creation, newest first", "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/db/apply-endpoint-deletion.integration.spec.js#leaves the same audit rows, events, revisions and no record, as the record store does" ] } ]
Expected
Inspect the complete refusal and successful cleanup separately.
Data
A root reaches two custom records and one has a restricting link.
Source
react-console:acceptance/custom-objects/playwright/journeys/PLAT-M6-S08.spec.ts#PLAT-M6-S08: an insured boat cannot be deleted and a builder's deletion takes its boats except the refused one,services-platform:modules/custom-objects/tests/integration/services/history/custom-object-record-history.integration.spec.js#answers the association, the update and the creation, newest first,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/db/apply-endpoint-deletion.integration.spec.js#leaves the same audit rows, events, revisions and no record, as the record store does
11 Every publication state can be selected from each current statetransitionapiproposed
Proves
BR-CAP-PFM-MTD-013-01
Preconditions
A publishable active object has a separate unlocked record for each source and target state pair.
Steps
[ { "do": "Set each record to its source state, reread its version and select the target state; include all sixteen pairs and reread the record, audit and events.", "provenance": "proposed", "source": "specs/platform/metadata/design/state-models/STATE-PFM-MTD-006-custom-record-publication.md" } ]
Expected
The selected state and publication time satisfy the cited obligation for each pair; selecting the existing state adds no business event.
Data
Sixteen records covering the four-by-four publication matrix.
Source
specs/platform/metadata/design/state-models/STATE-PFM-MTD-006-custom-record-publication.md

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.