---
id: ATS-ACC-BAT-008
scope: CAP-ACC-BAT-008
product_area: accounting
module: batches
revision: 2
status: proposed
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
  rhythm-v2-docs: 37405d50d1465ea0571a66095d98ebec4db04175
scenarios:
  - id: ATS-ACC-BAT-008-01
    title: Waiting status is specific to transaction batches
    level: unit
    proves:
      - BR-CAP-ACC-BAT-008-01
    preconditions: Transaction batches cover all statuses and a system batch is present.
    steps: Evaluate whether each awaits posting.
    expected: 'Only Closed, Verified, Posting and Error transaction batches qualify.'
    negative: false
    data_needs: Provide no fixtures beyond the stated setup.
    bound_to:
      - TST-ACC-BAT-120
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/attention/batches-awaiting-posting.spec.js#holds
      for a transaction batch in exactly closed, verified, posting and error
    category: rule
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/unit/attention/batches-awaiting-posting.spec.js#holds
        for a transaction batch in exactly closed, verified, posting and error
      - >-
        services-accounting:modules/batches/tests/unit/attention/batches-awaiting-posting.spec.js#never
        holds for a system batch
  - id: ATS-ACC-BAT-008-02
    title: Close creates the attention item
    level: api
    proves:
      - BR-CAP-ACC-BAT-008-02
      - BR-CAP-ACC-BAT-008-03
    preconditions: The batch starts Open.
    steps: 'Retrieve attention items, close the batch and retrieve them again.'
    expected: Open has none; closing creates one open item with the expected mapping.
    negative: false
    data_needs: Provide accounting's attention publisher in process.
    bound_to:
      - TST-ACC-BAT-082
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/batch-attention-items.integration.spec.js#publishes
      one open item of the batch with every element mapped
    category: transition
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batch-attention-items.integration.spec.js#publishes
        one open item of the batch with every element mapped
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batch-attention-items.integration.spec.js#has
        no item
  - id: ATS-ACC-BAT-008-03
    title: Leaving the waiting set resolves attention
    level: api
    proves:
      - BR-CAP-ACC-BAT-008-04
    preconditions: Four Closed batches have attention items.
    steps: >-
      Post, reopen, archive and delete them respectively, then close the
      reopened record again.
    expected: >-
      Each original item resolves with its outcome; the repeated close starts a
      new generation.
    negative: false
    data_needs: Provide no fixtures beyond the stated setup.
    bound_to:
      - TST-ACC-BAT-082
    provenance: test
    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
    category: interaction
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batch-attention-items.integration.spec.js#resolves
        a posted batch posted, after its posting kept it open
      - >-
        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/integration/services/persistence/batch-attention-items.integration.spec.js#resolves
        an archived batch archived
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batch-attention-items.integration.spec.js#resolves
        a deleted batch record_deleted
  - id: ATS-ACC-BAT-008-04
    title: Allowances determine deadlines
    level: unit
    proves:
      - BR-CAP-ACC-BAT-008-05
    preconditions: >-
      Posting allowances are five days, zero days, two and a half days,
      forty-five days and absent.
    steps: Calculate a deadline from each close time.
    expected: >-
      Five days preserves the close’s wall-clock time and zero uses the close
      itself; fractional, oversized and absent values use the two-day default.
    negative: true
    data_needs: Provide no fixtures beyond the stated setup.
    bound_to:
      - TST-ACC-BAT-082
      - TST-ACC-BAT-120
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/unit/attention/batches-awaiting-posting.spec.js#answers
      the default 2 for a missing, fractional, out-of-bounds or mistyped value
    category: boundary
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batch-attention-items.integration.spec.js#dues
        the item five days after the close
      - >-
        services-accounting:modules/batches/tests/unit/attention/batches-awaiting-posting.spec.js#answers
        the default 2 for a missing, fractional, out-of-bounds or mistyped value
      - >-
        services-accounting:modules/batches/tests/unit/attention/batches-awaiting-posting.spec.js#counts
        calendar days in the tenant zone, keeping the wall-clock time across the
        end of daylight saving
      - >-
        services-accounting:modules/batches/tests/unit/attention/batches-awaiting-posting.spec.js#answers
        the close itself for an allowance of 0 days
  - id: ATS-ACC-BAT-008-05
    title: The sweep repairs attention state
    level: api
    proves:
      - BR-CAP-ACC-BAT-008-06
    preconditions: >-
      One waiting item is missing, another no longer qualifies and the allowance
      changed.
    steps: Run the workspace sweep.
    expected: >-
      It publishes the missing item, clears the obsolete one, refreshes
      deadlines and records the sweep time.
    negative: false
    data_needs: Provide no fixtures beyond the stated setup.
    bound_to:
      - TST-ACC-BAT-082
    provenance: test
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/batch-attention-items.integration.spec.js#publishes
      the batch whose item was lost
    category: invariant
    test_evidence:
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batch-attention-items.integration.spec.js#publishes
        the batch whose item was lost
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batch-attention-items.integration.spec.js#resolves
        the item of the batch that no longer awaits posting, cleared
      - >-
        services-accounting:modules/batches/tests/integration/services/persistence/batch-attention-items.integration.spec.js#refreshes
        the due instant of every item it published from the close
  - id: ATS-ACC-BAT-008-06
    title: New intake does not start posting attention
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-BAT-001-01
      - BR-CAP-ACC-BAT-008-01
    exercises:
      - CAP-ACC-BAT-008
      - CAP-ACC-BAT-001
    workflows:
      - WF-ACC-BAT-001
    preconditions: Attention publication is enabled for the unit.
    steps: Create Morning without an automatic close and inspect its attention.
    expected: Morning is Open and has no waiting item.
    negative: false
    data_needs: >-
      An isolated workspace with the stated business-unit calendar, documents
      and configuration.
    bound_to: []
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/e2e/batches.e2e.spec.js#refuses
      a create naming the status 400: a new batch is always open;
      services-accounting:modules/batches/tests/unit/attention/batches-awaiting-posting.spec.js#holds
      for a transaction batch in exactly closed, verified, posting and error
  - id: ATS-ACC-BAT-008-07
    title: Reopening retires one attention generation
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-BAT-004-03
      - BR-CAP-ACC-BAT-008-04
    exercises:
      - CAP-ACC-BAT-008
      - CAP-ACC-BAT-004
    workflows:
      - WF-ACC-BAT-001
    preconditions: Attention publication is enabled and Morning is Open.
    steps: 'Close Morning, inspect its attention, reopen it, then close it again.'
    expected: The first item is resolved and the second close creates a new generation.
    negative: false
    data_needs: >-
      An isolated workspace with the stated business-unit calendar, documents
      and configuration.
    bound_to: []
    provenance: proposed
    source: >-
      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);
      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
  - id: ATS-ACC-BAT-008-08
    title: Deletion resolves posting attention
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-BAT-006-07
      - BR-CAP-ACC-BAT-008-04
    exercises:
      - CAP-ACC-BAT-008
      - CAP-ACC-BAT-006
    workflows:
      - WF-ACC-BAT-001
    preconditions: Attention publication is enabled for an unused Closed batch.
    steps: Delete the batch and inspect its formerly open attention item.
    expected: The batch is absent and its waiting item is resolved.
    negative: false
    data_needs: >-
      An isolated workspace with the stated business-unit calendar, documents
      and configuration.
    bound_to: []
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#deletes
      an empty batch with its automatic close’s schedule;
      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
  - id: ATS-ACC-BAT-008-09
    title: Posting resolves waiting attention
    category: interaction
    level: api
    proves:
      - BR-CAP-ACC-BAT-008-04
      - BR-CAP-ACC-BAT-013-03
    exercises:
      - CAP-ACC-BAT-008
      - CAP-ACC-BAT-013
    workflows: []
    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.
    negative: false
    data_needs: >-
      An isolated workspace with the stated business-unit calendar, documents
      and configuration.
    bound_to: []
    provenance: proposed
    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
evidence:
  - services-accounting at f47cb263: 'Inspected references: scenario-bound tests in modules/batches/tests.'
  - >-
    Pinned design objects, state models and workflows identify invariant and
    interaction obligations; scenario test anchors remain in test_evidence.
product_intent: proposed
coverage:
  rule: 'gap: FND-ACC-BAT-062'
  transition: covered
  validation: not-applicable
  permission: not-applicable
  edge: 'gap: FND-ACC-BAT-062'
  failure: 'gap: FND-ACC-BAT-062'
  boundary: covered
  concurrency: 'gap: FND-ACC-BAT-062'
  invariant: covered
  interaction: covered
coverage_notes:
  validation: >-
    The allowance calculation substitutes defaults for invalid values; this
    capability defines no rejecting input-validation operation.
  permission: >-
    Attention is maintained by internal batch writes and scheduled work; this
    capability declares no separate caller permission.
  edge: >-
    Sweep page failure, publication races, allowance limits, item refresh after
    document changes and console bulk execution remain unproved as complete
    workflows.
  failure: >-
    Sweep page failure, publication races, allowance limits, item refresh after
    document changes and console bulk execution remain unproved as complete
    workflows.
  concurrency: >-
    Sweep page failure, publication races, allowance limits, item refresh after
    document changes and console bulk execution remain unproved as complete
    workflows.
rule_coverage:
  - rule: BR-CAP-ACC-BAT-008-01
    scenarios:
      - ATS-ACC-BAT-008-01
      - ATS-ACC-BAT-008-06
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/unit/attention/batches-awaiting-posting.spec.js#holds
      for a transaction batch in exactly closed, verified, posting and error
  - rule: BR-CAP-ACC-BAT-008-02
    scenarios:
      - ATS-ACC-BAT-008-02
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/batch-attention-items.integration.spec.js#publishes
      one open item of the batch with every element mapped
  - rule: BR-CAP-ACC-BAT-008-03
    scenarios:
      - ATS-ACC-BAT-008-02
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/batch-attention-items.integration.spec.js#keeps
      one open item, its first generation, with the new label and number
  - rule: BR-CAP-ACC-BAT-008-04
    scenarios:
      - ATS-ACC-BAT-008-03
      - ATS-ACC-BAT-008-07
      - ATS-ACC-BAT-008-08
      - ATS-ACC-BAT-008-09
    provenance: proposed
    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
  - rule: BR-CAP-ACC-BAT-008-05
    scenarios:
      - ATS-ACC-BAT-008-04
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/unit/attention/batches-awaiting-posting.spec.js#answers
      the default 2 for a missing, fractional, out-of-bounds or mistyped value
  - rule: BR-CAP-ACC-BAT-008-06
    scenarios:
      - ATS-ACC-BAT-008-05
    provenance: proposed
    source: >-
      services-accounting:modules/batches/tests/integration/services/persistence/batch-attention-items.integration.spec.js#publishes
      the batch whose item was lost
  - rule: BR-CAP-ACC-BAT-008-07
    scenarios: []
    gap: FND-ACC-BAT-062
    provenance: unknown
    source: FND-ACC-BAT-062
transition_coverage: []
permission_coverage: []
executable_coverage:
  bound_scenarios: 5
  unbound_scenarios:
    - ATS-ACC-BAT-008-06
    - ATS-ACC-BAT-008-07
    - ATS-ACC-BAT-008-08
    - ATS-ACC-BAT-008-09
  gap: FND-ACC-BAT-062
---

# Bring waiting batches to the posting team’s attention: 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.

| Rule | Proof Specification or Gap |
|---|---|
| `BR-CAP-ACC-BAT-008-01` | `ATS-ACC-BAT-008-01`, `ATS-ACC-BAT-008-06` |
| `BR-CAP-ACC-BAT-008-02` | `ATS-ACC-BAT-008-02` |
| `BR-CAP-ACC-BAT-008-03` | `ATS-ACC-BAT-008-02` |
| `BR-CAP-ACC-BAT-008-04` | `ATS-ACC-BAT-008-03`, `ATS-ACC-BAT-008-07`, `ATS-ACC-BAT-008-08`, `ATS-ACC-BAT-008-09` |
| `BR-CAP-ACC-BAT-008-05` | `ATS-ACC-BAT-008-04` |
| `BR-CAP-ACC-BAT-008-06` | `ATS-ACC-BAT-008-05` |
| `BR-CAP-ACC-BAT-008-07` | `FND-ACC-BAT-062` |

## Interactions With Related Capabilities

New intake does not start posting attention. Reopening retires one attention generation. Deletion resolves posting attention. Posting resolves waiting attention. 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.
