Skip to content

ATS-ACC-BAT-013Run and monitor a batch posting job: Capability Test Specification

Markdown

ATS-ACC-BAT-013

Run and monitor a batch posting job: Capability Test Specification

Markdown
  • DocumentProposed
  • Product intentProposed

KindAcceptance test setProduct areaAccountingModuleBatch ManagementRevision2

Read atservices-accounting f47cb263react-console baf6dae3rhythm-v2-docs 37405d50

Run and monitor a batch posting job: Capability Test Specification ​

Coverage ​

The scenarios define focused checks for this outcome. The coverage map distinguishes specified checks from unresolved proof; executable bindings identify inspected assertions and carry no execution result.

Recorded posting is distinguishable from live intake. Post produces a protected completed batch. Scheduled close submits accounting after retirement. Posting prevents ordinary deletion. Posting freezes document placement. Posting resolves waiting attention. Reactivation and rolling have distinct posting effects. Readiness does not reserve eligibility. Account refusal leaves no partial ledger. Dependency failure differs from whole-job failure. Reposting creates a fresh generation. Successful posting owns a revenue plan. These checks use the related capability’s outcome as part of the setup or verification. Unbound interactions remain proposed until a suite executes the complete chain.

Coverage

  • Rule covered
  • Transition gap: FND-ACC-BAT-067
  • Validation covered
  • Permission gap: FND-ACC-BAT-067
  • Edge covered
  • Failure covered
  • Boundary covered
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

26 scenarios proving CAP-ACC-BAT-013; 11 bound to an existing test.

01 Submission validates access and existencepermissionapinegativetest
Proves
BR-CAP-ACC-BAT-013-01 BR-CAP-ACC-BAT-013-02
Preconditions
A reader lacks posting access and staff can post.
Steps
Submit as the reader, then submit an empty selection and a selection including an unknown reference as staff.
Expected
Permission and empty-selection failures return 403 and 400; an unknown reference prevents job creation.
Data
Provide security fixtures.
Bound to
Source
services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#refuses a posting without the posting permission, 403
02 The console watches asynchronous postingtransitionbrowsertest
Proves
BR-CAP-ACC-BAT-013-03 BR-CAP-ACC-BAT-013-14
Preconditions
A Closed batch contains invoices and payments.
Steps
Submit Post and follow the progress panel.
Expected
The request returns a job; its two visible stages complete and the batch becomes Posted.
Data
Provide the acceptance workspace.
Bound to
Source
services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#posts a batch as a durable job: the answer is the job, and the job posts the batch
03 Repeated requests reuse a submissioninvariantapitest
Proves
BR-CAP-ACC-BAT-013-04 INV-DOM-ACC-BAT-003-02
Preconditions
The batch is eligible for posting.
Steps
Repeat keyed and differently keyed requests while running and after completion, then unpost and post again.
Expected
Equivalent posting requests return the first job; unposting and the next posting create two additional jobs.
Data
Provide no fixtures beyond the stated setup.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/jobs/submission-identity.integration.spec.js#answers a colleague's retry under another key, after the posting finished, with the job that posted (DEF-ACT-0514)
04 Action eligibility differs from engine eligibilityedgeunitnegativeproposed
Proves
BR-CAP-ACC-BAT-013-05
Preconditions
Batches represent Open, Closed, Error, Archived, Posted and Posting.
Steps
Request posting through the action and engine, including successful and failed Error retries.
Expected
Each entry point enforces its own status set, and retry replaces the previous error details.
Data
Provide no fixtures beyond the stated setup.
Source
FND-ACC-BAT-027
05 Period guards apply before and during workvalidationapinegativetest
Proves
BR-CAP-ACC-BAT-013-06
Preconditions
A September batch remains after its period closes.
Steps
Invoke Post and submit a job directly.
Expected
The action refuses before creating a job; the submitted job fails its period check and preserves the Open batch.
Data
Provide a fiscal close.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/close/posting-period-guard.integration.spec.js#fails the job with the refusal naming the period and its state
06 Locks and system types prevent postingruleapinegativetest
Proves
BR-CAP-ACC-BAT-013-07 BR-CAP-ACC-BAT-013-08
Preconditions
Selections include a locked ordinary batch and a deferred-revenue batch.
Steps
Submit through actions and jobs, then unlock the ordinary batch and retry.
Expected
The lock blocks ordinary attempts; the system job fails; the unlocked ordinary batch can post.
Data
Provide no fixtures beyond the stated setup.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/jobs/batch-posting-record.integration.spec.js#is not posted by a job: the check step fails with the lock, and the batch stays open (DEF-ACT-0503)
07 Write failure preserves atomicityfailureapinegativetest
Proves
BR-CAP-ACC-BAT-013-09 INV-DOM-ACC-BAT-003-03
Preconditions
The database rejects the write stage once.
Steps
Run posting through the deployed task handler.
Expected
The failure stage records the error while leaving the batch Open without posting, entries or schedules.
Data
Provide a refusing trigger in the test database.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/jobs/deployed-task-handler.integration.spec.js#fails the job on a step the database refuses: refused once, recorded by the failure task, the batch open and nothing written
08 Failure follows dependencies without blocking unrelated batchesfailurebrowsernegativetest
Proves
BR-CAP-ACC-BAT-013-10
Preconditions
January can post; April refers to an unposted credit and May depends on April.
Steps
Post all three in one request.
Expected
January posts; April reports its application problem and May its dependency; neither failed batch writes ledger records.
Data
Provide rebuilt documents fixtures.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-posting-edges.integration.spec.js#posts January, puts April in error naming the application whose credit's batch is not posted, and May in error as April's dependent
09 Posting records time and statisticsruleapitest
Proves
BR-CAP-ACC-BAT-013-11
Preconditions
The batch contains invoices, memos, a write-off and payments, including a voided payment.
Steps
Post and reread it.
Expected
Posting time and job are stored with per-kind base totals; the voided payment and reversal do not contribute.
Data
Provide no fixtures beyond the stated setup.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#records the batch's statistics: the documents counted by kind and their base totals
10 Empty and voided-only batches differedgeapitest
Proves
BR-CAP-ACC-BAT-013-12
Preconditions
An empty batch accompanies a populated batch and another batch contains only a voided payment.
Steps
Submit posting with ordinary options and with empty-deletion disabled.
Expected
The empty batch is deleted in either case; the voided-only batch posts without entries or errors.
Data
Provide no fixtures beyond the stated setup.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-posting-edges.integration.spec.js#posts February with its one entry, and June is gone (RS-1116)
11 Concurrent requests serialize postingconcurrencyapinegativetest
Proves
BR-CAP-ACC-BAT-013-13 INV-DOM-ACC-BAT-003-01
Preconditions
A postable batch is held by a second database transaction that changes its status to Posted.
Steps
Start direct posting, observe it waiting on the row lock, commit the competing status change and inspect the outcome.
Expected
Posting waits and then refuses the Posted batch without writing a posting or entry.
Data
Provide two browser sessions.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/posting/concurrent-posting.integration.spec.js#makes a direct posting wait for the batch, then refuse it as posted, with no posting and no entry written
12 Descriptions do not control production behaviorrulebrowsertest
Proves
BR-CAP-ACC-BAT-013-15
Preconditions
The description contains the old SetAsError test marker.
Steps
Post the batch.
Expected
The text does not force an error.
Data
Provide no fixtures beyond the stated setup.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/jobs/batch-posting-record.integration.spec.js#posts a batch whose description is a 1.0 test directive, as any other (DEF-ACT-0512)
13 Job actions differ from workflow retriesruleunitproposed
Proves
BR-CAP-ACC-BAT-013-16
Preconditions
Posting and unposting job kinds are registered.
Steps
Inspect user controls and task retry configuration.
Expected
User retry and cancellation are disabled while workflow task retries remain configured.
Data
Provide fixtures appropriate to the stated accounting context.
Source
services-accounting:modules/batches/services/jobs/batch-posting-jobs.ts:ensureBatchPostingJobTypesRegistered
14 Recorded posting is distinguishable from live intakeinteractionapiproposed
Proves
BR-CAP-ACC-BAT-002-03 BR-CAP-ACC-BAT-013-11
Preconditions
One batch holds an issued invoice and an unvoided payment.
Steps
Read its live totals, post it, then read its recorded statistics and current totals.
Expected
The same reference is Posted with recorded posting time; live totals and recorded statistics can be inspected separately.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/persistence/batch-totals.queries.integration.spec.js#counts exactly the real transactions of every kind and sums their amounts; services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#records the batch's statistics: the documents counted by kind and their base totals
15 Post produces a protected completed batchinteractionapinegativeproposed
Proves
BR-CAP-ACC-BAT-004-01 BR-CAP-ACC-BAT-013-03
Preconditions
Morning is Open with one eligible invoice.
Steps
Post through the named action, wait for completion and attempt Archive.
Expected
Morning becomes Posted with an entry; Archive returns 409 and preserves it.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/e2e/batch-actions.e2e.spec.js#answers each status action with the updated batch; services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#posts a batch as a durable job: the answer is the job, and the job posts the batch
16 Scheduled close submits accounting after retirementinteractionapiproposed
Proves
BR-CAP-ACC-BAT-005-03 BR-CAP-ACC-BAT-013-03
Preconditions
Morning is Open with an invoice and a due close.
Steps
Deliver the occurrence and inspect its outcome and the submitted job.
Expected
Morning closes and the run identifies one posting request for the retired collection.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#submits one posting job of the closed batch, in its unit, for the tenant’s customer (D13); services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#posts a batch as a durable job: the answer is the job, and the job posts the batch
17 Posting prevents ordinary deletioninteractionapinegativeproposed
Proves
BR-CAP-ACC-BAT-006-02 BR-CAP-ACC-BAT-013-03
Preconditions
Morning contains one eligible invoice.
Steps
Post Morning, then attempt deletion and reread its posting and entry.
Expected
Deletion returns 409 and the Posted batch and its current entry remain.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses deleting a posted batch; services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#posts a batch as a durable job: the answer is the job, and the job posts the batch
18 Posting freezes document placementinteractionapinegativeproposed
Proves
BR-CAP-ACC-BAT-007-04 BR-CAP-ACC-BAT-013-03
Preconditions
A draft invoice and two Open batches exist in one unit.
Steps
Issue into Morning, post Morning, then try to move the invoice to Evening.
Expected
The move is refused and the invoice and its entry still identify Morning.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#refuses, in the database, moving a document out of a posted batch (RHA05); services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#posts a batch as a durable job: the answer is the job, and the job posts the batch
19 Posting resolves waiting attentioninteractionapiproposed
Proves
BR-CAP-ACC-BAT-008-04 BR-CAP-ACC-BAT-013-03
Preconditions
Attention publication is enabled and Morning is Closed with one eligible invoice.
Steps
Inspect the waiting item, post Morning and inspect the item again.
Expected
Morning is Posted and its waiting item is resolved.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/persistence/batch-attention-items.integration.spec.js#resolves a reopened batch reopened, and its next close opens the second generation; services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#posts a batch as a durable job: the answer is the job, and the job posts the batch
20 Reactivation and rolling have distinct posting effectsinteractionapinegativeproposed
Proves
BR-CAP-ACC-BAT-009-06 BR-CAP-ACC-BAT-013-03
Preconditions
Two inactive streams each retain a populated Open predecessor.
Steps
Reactivate the first and roll the second after activation using separate fixtures.
Expected
Reactivation can retire intake without a posting request; the subsequent roll records the predecessor’s posting request or refusal.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/roll/batch-roller.integration.spec.js#saves a recurring batch whose first batch is refused, with the refusal and no batch; services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#posts a batch as a durable job: the answer is the job, and the job posts the batch
21 Readiness does not reserve eligibilityinteractionapinegativeproposed
Proves
BR-CAP-ACC-BAT-012-06 BR-CAP-ACC-BAT-013-06
Preconditions
Morning has a valid invoice in an Open period.
Steps
Preview Morning, close its fiscal period using a controlled fixture and request posting.
Expected
The earlier preview is eligible; the later action refuses the changed fiscal state without creating a job.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/services/engine/preview-batches.ts:periodProblemOf; services-accounting:modules/batches/services/persistence/posting-periods.ts:lockPostingPeriodForDate; services-accounting:modules/batches/services/actions/batch-actions.ts:postBatch; services-accounting:modules/batches/services/engine/engine-scope.ts:lockBatchesForPosting
22 Account refusal leaves no partial ledgerinteractionapiproposed
Proves
BR-CAP-ACC-BAT-013-10 BR-CAP-ACC-BAT-014-03
Preconditions
Morning holds an issued invoice whose product and unit have no revenue account.
Steps
Submit posting and inspect the batch, entries and the line’s resolution error.
Expected
Morning is Error with an identifying account reason and no current entries.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-posting-edges.integration.spec.js#posts January, puts April in error naming the application whose credit's batch is not posted, and May in error as April's dependent; services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#fails the batch’s validation with an error naming the invoice, the missing accounts receivable account, the product’s setup and the unit’s default
23 Dependency failure differs from whole-job failureinteractionapiproposed
Proves
BR-CAP-ACC-BAT-013-10 BR-CAP-ACC-BAT-015-10
Preconditions
January is valid, April depends on an unposted credit and May depends on April.
Steps
Submit all three and inspect job, batch states and entries.
Expected
January is Posted; April and May are Error without entries, with their respective reasons.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/posting/rebuilt-posting-edges.integration.spec.js#posts January, puts April in error naming the application whose credit's batch is not posted, and May in error as April's dependent; services-accounting:modules/batches/tests/integration/services/posting/rebuilt-documents.integration.spec.js#refuses November alone while October is open: November in error, naming the memo's invoice and October's status
24 Reposting creates a fresh generationinteractionapiproposed
Proves
BR-CAP-ACC-BAT-013-04 BR-CAP-ACC-BAT-016-09
Preconditions
Morning contains one invoice and its fiscal period remains Open.
Steps
Post, recover and post Morning again; inspect all posting history and current entries.
Expected
Two posting generations remain, the first reversed, with only the second generation’s entries current.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/jobs/submission-identity.integration.spec.js#answers a colleague's retry under another key, after the posting finished, with the job that posted (DEF-ACT-0514); services-accounting:modules/batches/tests/integration/services/posting/unpost-deletes-entries.integration.spec.js#writes one fresh set when the batch is posted again, equal in size to the first
25 Successful posting owns a revenue planinteractionapiproposed
Proves
BR-CAP-ACC-BAT-013-03 BR-CAP-ACC-BAT-019-01
Preconditions
Morning contains one deferred invoice line.
Steps
Post Morning and inspect the invoice line’s revenue view and posting history.
Expected
The current plan identifies the completed posting and its scheduled amount can be inspected.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#posts a batch as a durable job: the answer is the job, and the job posts the batch; services-accounting:modules/batches/tests/integration/services/posting/rebuilt-deferral.integration.spec.js#writes H a schedule of three monthly entries on the firsts of October, November and December, summing to 300.00
26 Submission checks request limits before job creationboundaryapinegativeproposed
Proves
BR-CAP-ACC-BAT-013-02
Preconditions
One hundred postable collections belong to an isolated unit.
Steps
Submit one and one hundred references, then zero and one hundred one, using owned request identities.
Expected
Supported submissions return jobs; unsupported sizes return 400 without an additional job.
Data
Owned records in an isolated workspace with the stated calendar and accounting setup.
Source
services-accounting:modules/batches/services/jobs/batch-posting-jobs.ts:createBatchJob; services-accounting:modules/batches/services/rules/batch-posting-rules.ts:ensureBatchesCanBePosted

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.