---
id: ATS-PFM-INT-019
scope: CAP-PFM-INT-019
product_area: platform
module: integrations
revision: 3
status: superseded
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  macroservice-libraries: 54536a441935c6e09fdb7f96f0bec71c52ba4e03
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-PFM-INT-019-01
    title: Shipped recipes refuse customer changes
    level: api
    proves:
      - BR-CAP-PFM-INT-019-01
    preconditions: The shipped recipe collection is available.
    steps: List action recipes and attempt replacement and deletion of a shipped entry.
    expected: Shipped entries appear first and identified; both mutations refuse.
    negative: true
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to:
      - TST-PFM-INT-591
      - TST-PFM-INT-587
      - TST-PFM-INT-604
    provenance: test
    source: >-
      services-platform:modules/workflow-actions/tests/integration/services/persistence/action-templates.integration.spec.js#refuses
      a replacement of one (405)
    category: rule
    binding_evidence:
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/persistence/action-templates.integration.spec.js#refuses
        a replacement of one (405)
      - >-
        services-platform:modules/workflow-actions/tests/e2e/workflow-actions.e2e.spec.js#lists Rhythm’s
        action templates first, each marked shipped
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/persistence/action-templates.integration.spec.js#refuses
        a delete of one (405)
      - >-
        services-platform:modules/workflow-actions/tests/unit/contracts/shipped-templates.spec.ts#are the
        six of 09 §4, by name, in display order
    binding_scope: >-
      contributions: the cited tests support their own asserted outcomes. Additional setup, branches
      and combined sequences remain proposed unless the cited assertions exercise them.
  - id: ATS-PFM-INT-019-02
    title: Recipe contents must be configurable now
    level: api
    proves:
      - BR-CAP-PFM-INT-019-02
    preconditions: 'Registry types include retired, inactive and host-restricted actions.'
    steps: >-
      Save recipes using those types, invalid settings and a workflow stage pointing to an absent stage,
      then a valid recipe.
    expected: Each invalid recipe reports its problem and only the valid recipe saves.
    negative: true
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to:
      - TST-PFM-INT-591
      - TST-PFM-INT-605
      - TST-PFM-INT-600
    provenance: test
    source: >-
      services-platform:modules/workflow-actions/tests/integration/services/persistence/action-templates.integration.spec.js#refuses
      a type that is declared and switched off
    category: validation
    binding_evidence:
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/persistence/action-templates.integration.spec.js#refuses
        a type that is declared and switched off
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/persistence/action-templates.integration.spec.js#refuses
        a type its application retired
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/persistence/action-templates.integration.spec.js#refuses
        a type offered on a host it may not be configured on
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/persistence/action-templates.integration.spec.js#refuses
        params the type does not declare
      - >-
        services-platform:modules/workflow-actions/tests/unit/services/validation/action-lists.spec.ts#refuses
        a type whose permission the configuring user does not hold
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/persistence/workflow-templates.integration.spec.js#refuses
        an advance to a stage the template does not hold
    binding_scope: >-
      contributions: the cited tests support their own asserted outcomes. Additional setup, branches
      and combined sequences remain proposed unless the cited assertions exercise them.
  - id: ATS-PFM-INT-019-03
    title: Recipe identity and versions prevent ambiguity
    level: api
    proves:
      - BR-CAP-PFM-INT-019-03
    preconditions: A workspace already has a recipe.
    steps: 'Reuse its identifier, use the reserved prefix and replace using a stale version.'
    expected: Every attempt is refused.
    negative: true
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to:
      - TST-PFM-INT-591
    provenance: test
    source: >-
      services-platform:modules/workflow-actions/tests/integration/services/persistence/action-templates.integration.spec.js#refuses
      an id in Rhythm’s own prefix, which the configuration-id grammar reserves (400)
    category: concurrency
    binding_evidence:
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/persistence/action-templates.integration.spec.js#refuses
        an id in Rhythm’s own prefix, which the configuration-id grammar reserves (400)
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/persistence/action-templates.integration.spec.js#refuses
        an id the tenant already uses (409)
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/persistence/action-templates.integration.spec.js#refuses
        a replacement at a version that is no longer the template’s (409)
    binding_scope: >-
      contributions: the cited tests support their own asserted outcomes. Additional setup, branches
      and combined sequences remain proposed unless the cited assertions exercise them.
  - id: ATS-PFM-INT-019-04
    title: Calendar validation preserves the single-default choice
    level: api
    proves:
      - BR-CAP-PFM-INT-019-05
    preconditions: A workspace already has a default.
    steps: >-
      Create invalid zones, empty weekdays, reversed hours and four hundred and one holidays, then a
      valid new default.
    expected: Invalid calendars refuse; the accepted default clears the previous flag.
    negative: true
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to:
      - TST-PFM-INT-596
      - TST-PFM-INT-588
    provenance: test
    source: >-
      services-platform:modules/workflow-actions/tests/integration/services/persistence/business-calendars.integration.spec.js#refuses
      more than 400 holidays
    category: validation
    binding_evidence:
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/persistence/business-calendars.integration.spec.js#refuses
        more than 400 holidays
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/persistence/business-calendars.integration.spec.js#refuses
        a time zone that is not an IANA name
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/persistence/business-calendars.integration.spec.js#refuses
        no working day
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/persistence/business-calendars.integration.spec.js#refuses
        working hours that end before they start
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/persistence/business-calendars.integration.spec.js#accepts
        exactly 400 holidays (the cap’s negative control)
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/persistence/business-calendars.integration.spec.js#clears
        the first’s default in the same write, moving its version
      - >-
        services-platform:modules/workflow-actions/tests/integration/db/workflow-actions-tables.integration.spec.js#refuses
        a second default of one tenant
    binding_scope: >-
      contributions: the cited tests support their own asserted outcomes. Additional setup, branches
      and combined sequences remain proposed unless the cited assertions exercise them.
  - id: ATS-PFM-INT-019-05
    title: Provisioning seeds the working week once
    level: api
    proves:
      - BR-CAP-PFM-INT-019-06
    preconditions: A workspace has not yet received defaults.
    steps: 'Provision, remove Standard week and provision again.'
    expected: The initial seed is default and its later user deletion does not cause recreation.
    negative: false
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to:
      - TST-PFM-INT-590
    provenance: test
    source: >-
      services-platform:modules/workflow-actions/tests/integration/services/maintenance/tenant-participant.integration.spec.js#gives
      the tenant Standard week in its own zone, as its default
    category: transition
    binding_evidence:
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/maintenance/tenant-participant.integration.spec.js#gives
        the tenant Standard week in its own zone, as its default
      - >-
        services-platform:modules/workflow-actions/tests/integration/services/maintenance/tenant-participant.integration.spec.js#does
        not give it again to a tenant that deleted it
    binding_scope: >-
      contributions: the cited tests support their own asserted outcomes. Additional setup, branches
      and combined sequences remain proposed unless the cited assertions exercise them.
  - id: ATS-PFM-INT-019-06
    title: Business arithmetic follows local working time
    level: unit
    proves:
      - BR-CAP-PFM-INT-019-07
    preconditions: A Monday-to-Friday calendar has a Monday holiday and nine-to-five hours.
    steps: Add two business days to Friday at four and four business hours from three.
    expected: 'The results are Wednesday at four and the next working day at eleven, respectively.'
    negative: false
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to:
      - TST-PFM-INT-002
    provenance: test
    source: >-
      macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#P2D business from a
      Friday 16:00 with a Monday holiday lands on Wednesday 16:00, across the DST change (08 §10 case 8)
    category: edge
    binding_evidence:
      - >-
        macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#P2D business from a
        Friday 16:00 with a Monday holiday lands on Wednesday 16:00, across the DST change (08 §10 case
        8)
      - >-
        macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#PT4H business from
        15:00 on a 09:00–17:00 calendar is 11:00 the next working day
      - >-
        macroservice-libraries:packages/workflow-actions/src/business-days.spec.ts#the calendar is read
        in its own zone, not the tenant’s
    binding_scope: >-
      contributions: the cited tests support their own asserted outcomes. Additional setup, branches
      and combined sequences remain proposed unless the cited assertions exercise them.
  - id: ATS-PFM-INT-019-07
    title: Configuration mutation requires the matching authority
    level: api
    proves:
      - BR-CAP-PFM-INT-019-09
    preconditions: A caller has registry read alone.
    steps: Attempt creation of an action recipe and a calendar.
    expected: Both operations deny access.
    negative: true
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to:
      - TST-PFM-INT-587
    provenance: test
    source: >-
      services-platform:modules/workflow-actions/tests/e2e/workflow-actions.e2e.spec.js#refuses a caller
      without templates-manage a write (403)
    category: permission
    binding_evidence:
      - >-
        services-platform:modules/workflow-actions/tests/e2e/workflow-actions.e2e.spec.js#refuses a
        caller without templates-manage a write (403)
    binding_scope: >-
      contributions: the cited tests support their own asserted outcomes. Additional setup, branches
      and combined sequences remain proposed unless the cited assertions exercise them.
  - id: ATS-PFM-INT-019-08
    title: Calendar limits and locks preserve existing state
    level: api
    proves:
      - BR-CAP-PFM-INT-019-10
    preconditions: 'The workspace holds one hundred calendars, an old copy, locked entries and one unlocked default.'
    steps: 'Exceed the count, replace the old copy, mutate locked entries and delete the unlocked default.'
    expected: >-
      Count, concurrency and lock violations preserve records and default; permitted default deletion
      leaves no default.
    negative: true
    data_needs: 'Fixtures establishing the stated accounts, declarations and history in an isolated workspace.'
    bound_to: []
    provenance: proposed
    source: >-
      services-platform:modules/workflow-actions/services/persistence/business-calendars.ts:createBusinessCalendar
    category: boundary
    binding_evidence: []
  - id: ATS-PFM-INT-019-09
    level: api
    negative: false
    data_needs: Run-owned records and principals in an isolated workspace.
    bound_to: []
    provenance: proposed
    title: Recipe edits leave a published automation unchanged
    category: interaction
    proves:
      - BR-CAP-PFM-INT-019-04
      - BR-CAP-PFM-INT-020-04
    exercises:
      - CAP-PFM-INT-019
      - CAP-PFM-INT-020
    preconditions: A rule publishes actions copied from a customer recipe.
    steps: 'Edit the recipe, inspect the published version and raise its event.'
    expected: >-
      Published content and raised work keep the copied actions until an explicit new version is
      published.
    source:
      - >-
        services-platform:docs/workflow-actions/README.md#Workflow actions: Platform's part of the
        Workflow Action Engine
      - >-
        services-platform:modules/workflow-actions/tests/integration/db/workflow-actions-tables.integration.spec.js#refuses
        a change to a published version’s actions
    workflows: []
evidence:
  - >-
    Each binding identifies an existing source test at the pinned revision; unbound scenarios remain
    proposed proof obligations.
coverage:
  rule: covered
  transition: covered
  validation: covered
  permission: covered
  edge: covered
  failure: 'gap: FND-PFM-INT-088'
  boundary: covered
  concurrency: covered
  invariant: 'gap: FND-PFM-INT-088'
  interaction: covered
coverage_notes:
  covered: A designed scenario exists; executable coverage and a passing run require separate evidence.
  gaps: >-
    The finding records categories without a designed scenario and remaining permission and rule audit
    obligations.
---
# Reuse workflow recipes and working-time configuration: Capability Test Specification

## Coverage

| Rule | Proved By |
|---|---|
| `BR-CAP-PFM-INT-019-01` | `ATS-PFM-INT-019-01` |
| `BR-CAP-PFM-INT-019-02` | `ATS-PFM-INT-019-02` |
| `BR-CAP-PFM-INT-019-03` | `ATS-PFM-INT-019-03` |
| `BR-CAP-PFM-INT-019-04` | `ATS-PFM-INT-019-09` |
| `BR-CAP-PFM-INT-019-05` | `ATS-PFM-INT-019-04` |
| `BR-CAP-PFM-INT-019-06` | `ATS-PFM-INT-019-05` |
| `BR-CAP-PFM-INT-019-07` | `ATS-PFM-INT-019-06` |
| `BR-CAP-PFM-INT-019-08` | `FND-PFM-INT-088` |
| `BR-CAP-PFM-INT-019-09` | `ATS-PFM-INT-019-07` |
| `BR-CAP-PFM-INT-019-10` | `ATS-PFM-INT-019-08` |

## Interactions With Related Capabilities

This superseded specification preserves the earlier combined coverage of recipes and calendars. Its interaction case remains traceable alongside the separate successor specifications; it does not create a new home for either capability’s rules.

The structured scenarios name the capabilities and rules involved. A bound test contributes only the outcomes it asserts; proposed transition matrices and composed interactions still require executable proof.
