Skip to content

CAP-ACC-BAT-004Use the batch’s permitted lifecycle actions

Markdown

CAP-ACC-BAT-004

Use the batch’s permitted lifecycle actions

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaAccountingModuleBatch ManagementRevision1

Read atservices-accounting f47cb263react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Staff can retire or restore collections through the available lifecycle actions.
Surfaces
consoleapi
Intent sources
services-accounting:docs/migrations/transaction-processing/batches/README.md#Status as actions (job tp-batch-lifecycle, Andrew's UI brief of 2026-10-15)

Controls

23 controls apply, from the corpus control catalogue.

TC-IAM-001 TC-IAM-002 TC-IAM-004 TC-IAM-005 TC-IAM-006 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-005 TC-AZ-006 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-DAT-001 TC-LOG-001 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-PI-001 TC-PI-003 TC-PI-005

Permissions

KeyChecked atScope
accounting.batches.readapitenant
accounting.batches.updateapitenant
accounting.batch-postings.postapitenant
accounting.batch-postings.unpostapitenant

Business Rules

11 rules, 10 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
The public interface changes status through Close, Reopen, Archive, Unarchive, Post and Unpost rather than a status field edit.
origin: services-accounting:docs/migrations/transaction-processing/batches/README.md#Status as actions (Andrew's UI brief of 2026-10-15)
lifecycleapi, servicetest
services-accounting:modules/batches/tests/e2e/batch-actions.e2e.spec.js#answers each status action with the updated batch
02must prove
Proposed
Close accepts an Open batch and rejects other starting states.
origin: services-accounting:docs/migrations/transaction-processing/batches/README.md#Status as actions (Andrew's UI brief of 2026-10-15)
lifecycleservicetest
03must prove
Proposed
Reopen accepts Closed, Verified and Error, clears recorded errors, and leaves posted and archived batches to their separate Unpost and Unarchive actions.
origin: services-accounting:docs/migrations/transaction-processing/batches/README.md#Status as actions (Andrew's UI brief of 2026-10-15)
lifecycleservicetest
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#clears the errors of an errored batch on reopen, so the open batch carries none (journey ACT-ACC-0521)
04must prove
Proposed
Archive accepts Open or Closed, stops document intake and posting, and clears the automatic close.
origin: services-accounting:docs/migrations/transaction-processing/batches/README.md#Status as actions (Andrew's UI brief of 2026-10-15)
lifecycleservicetest
05must prove
Proposed
Unarchive opens the batch without restoring the state it had before archive.
lifecycleservicetest
06must prove
Proposed
The action catalogue offers Post, Close and Archive for Open; Post, Reopen and Archive for Closed; Reopen for Verified; Post and Reopen for Error; Unarchive for Archived; and Unpost for Posted, Downloaded or posting work unchanged for over an hour.
lifecycleservicetest
services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js#offers a batch posting for half an hour nothing, and one stuck in posting for over an hour unpost
07must prove
Proposed
Lifecycle actions require update permission, Post requires posting permission and Unpost requires unposting permission, with unauthorized actions omitted and execution refused before mutation.
permissionapi, service, consoletest
services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js#refuses a caller without the action’s permission, 403, before the command runs
08must prove
Proposed
An update-locked batch lists the applicable actions as disabled with a lock explanation and rejects their execution.
policyservice, consoletest
services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js#lists a locked batch’s status actions with the refusal the command would answer as disabled_reason
09must prove
Proposed
System batches offer no ordinary action and reject every such action because fiscal close and reopen control them.
policyservicetest
services-accounting:modules/batches/tests/e2e/system-batches.e2e.spec.js#offers an administrator no action for the system batch
10
Proposed
Post, Archive and Unpost require confirmation, and Post warns when an Open batch will stop accepting documents.
policyservice, consoletest
services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js#answers an open batch’s actions with their labels, placements, targets, confirmations and the warning
11must prove
Proposed
Action execution rejects an unknown action or an extra batch reference, and accepts a reason or note without retaining it.
validationapitest
services-accounting:modules/batches/tests/e2e/batch-actions.e2e.spec.js#refuses an action the batch has not 400, naming the actions

Scenarios

IdGivenWhenThenProvenance
01The daily receivables batch is Open with its collected documents.Staff select Close from its actions.The page presents Closed and offers the subsequent permitted actions.documented
02A reader without write permission opens an Open batch.The reader inspects the status actions.The page offers no permitted status change and an unauthorized API action is refused.test
03A batch was Closed before staff archived it.Staff choose Unarchive.It returns Open and can be closed again if needed.test

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.