Skip to content

CAP-ACC-BAT-010Advance a scheduled stream and post its predecessor

Markdown

CAP-ACC-BAT-010

Advance a scheduled stream and post its predecessor

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaAccountingModuleBatch ManagementRevision1

Read atservices-accounting f47cb263react-console baf6dae3

Advance a scheduled stream and post its predecessor ​

Purpose ​

Scheduled rolls provide the next batch and retire the preceding batch without duplicating an occurrence.

How It Works ​

The scheduler delivers an occurrence to the roll handler. The handler derives the local batch date and renders its planned labels. It then opens the successor and changes the stream’s active reference. The predecessor is deleted, closed or left unchanged according to its current condition. A predecessor eligible for automatic posting receives a job after the roll commits. History records the outcome, and a repeated occurrence reuses the batch already produced.

Relationships ​

  • Prerequisite: Configure recurring batch streams, which addresses the connected batch work.
  • Prerequisite: Run and monitor a batch posting job, which addresses the connected batch work.
  • Related outcome: Collect a business unit’s documents in a new batch, which addresses the connected batch work.
  • Related outcome: Arrange automatic close and posting, which addresses the connected batch work.

The Formal Contract

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

Outcomes
A handled occurrence identifies its new collection and the disposition of the prior collection.
Surfaces
consoleapijob
Constraints
Accounting scheduling delivers the occurrences handled by the roll.
Intent sources
services-accounting:docs/migrations/transaction-processing/batches/README.md#D13: automatic posting (Andrew, 2026-10-16)services-accounting:docs/migrations/transaction-processing/batches/README.md#D14 and migration 0060 (Andrew, 2026-10-16)

Controls

29 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-006 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-DAT-001 TC-DAT-004 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-AVL-001 TC-AVL-004 TC-MON-001 TC-MON-002 TC-MON-004 TC-PI-001 TC-PI-002 TC-PI-003 TC-PI-004 TC-PI-005

Permissions

KeyChecked atScope
accounting.recurring-batches.readapitenant

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
A roll opens a transaction batch using the occurrence’s calendar date in the schedule zone, the configured templates, the unit currency and that date’s fiscal period.
calculationservicetest
services-accounting:modules/batches/tests/integration/services/roll/batch-roller.integration.spec.js#opens the new batch, dated the occurrence’s local date in Denver, and points the recurring batch at it
02must prove
Proposed
Generated names use the first available name in the unit, retaining the unsuffixed name after an empty predecessor is deleted and adding a numbered suffix when it remains occupied.
origin: services-accounting:docs/migrations/transaction-processing/batches/README.md#D14 and migration 0060 (Andrew, 2026-10-16)
calculationservicetest
services-accounting:modules/batches/tests/integration/services/roll/batch-roller.integration.spec.js#names the new batch with the " (2)" suffix when the previous batch is kept and still holds the name
03must prove
Proposed
The roll repoints its active reference to the new batch, deletes an unused predecessor or closes an eligible Open predecessor, and leaves locked, system or non-open predecessors unchanged.
lifecycleservicetest
04must prove
Proposed
The roll prepares automatic posting for the predecessor left Closed and starts that posting after its transaction commits.
origin: services-accounting:docs/migrations/transaction-processing/batches/README.md#D13: automatic posting (Andrew, 2026-10-16)
lifecycleservicetest
services-accounting:modules/batches/tests/integration/services/roll/batch-roller.integration.spec.js#posts the previous batch the roll leaves closed: one posting job of it, named in the run’s outcome
05must prove
Proposed
Deleting an unused predecessor creates no posting request.
origin: services-accounting:docs/migrations/transaction-processing/batches/README.md#D13: automatic posting (Andrew, 2026-10-16)
lifecycleservicetest
services-accounting:modules/batches/tests/integration/services/roll/batch-roller.integration.spec.js#posts nothing when the previous batch was empty and so deleted (RB-20, D13)
06must prove
Proposed
A repeated occurrence returns the batch already generated without creating another batch or another posting.
origin: services-accounting:docs/migrations/transaction-processing/batches/README.md#D13: automatic posting (Andrew, 2026-10-16)
invariantservice, databasetest
services-accounting:modules/batches/tests/integration/services/roll/batch-roller.integration.spec.js#opens nothing for the same occurrence delivered again, and answers the same batch
07must prove
Proposed
Opening, repointing and retiring the predecessor commit together, so a failure preserves the prior state for a retry.
origin: services-accounting:docs/migrations/transaction-processing/batches/README.md#Migration: transaction processing, plain batches (Rhythm 1.0 collect-batches) and the recurring batch roller (Andrew's porting rules, rule 5)
invariantservicetest
services-accounting:modules/batches/tests/integration/services/roll/batch-roller.integration.spec.js#leaves nothing: no new batch, the first batch still the active one, open
08must prove
Proposed
An unresolvable planning refusal fails the run with an explanation and creates no batch, with the documented scheduler contract pausing after five consecutive failed runs.
policyservicedocumented
09must prove
Proposed
A missing or inactive recurring configuration causes its occurrence to be skipped with an explanation.
policyserviceobserved
10
Proposed
Run history sorts newest first and records the plan, generated and replaced batches, disposition and posting job or posting refusal.
policyapi, servicetest
services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers the run the consumer recorded, every property of it
11must prove
Proposed
Next-roll preview uses the roll’s planning logic without recording an occurrence and refuses inactive configurations, schedules with no next run and invalid plans.
policyapi, servicetest

Scenarios

IdGivenWhenThenProvenance
01A daily card stream has a nonempty predecessor and a Denver-zone schedule.The due roll occurrence runs.The successor uses the occurrence’s local date, the predecessor is closed and posting starts, and history records the result.test
02The stream’s active batch is unused.Its next occurrence rolls.The predecessor is deleted, the successor uses the available base name and no posting is requested.test
03The unit has no fiscal year covering an upcoming occurrence.The administrator previews that occurrence.Preview refuses the missing fiscal context rather than generating a batch.test
services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers 409 to the preview of a recurring batch whose unit has no fiscal year containing the batch date

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.