---
id: WF-MBR-MEM-016
title: Act on a delivered application decision
trigger: Submissions delivers a decision for a Membership subject or join request.
product_area: membership
module: memberships
revision: 1
status: draft
design_intent: proposed
implementation_evidence: partially-observed
inference: []
source_sha:
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
implements:
  - CAP-MBR-MEM-012
  - CAP-MBR-MEM-009
moves:
  - STATE-MBR-MEM-006
  - STATE-MBR-MEM-003
  - STATE-MBR-MEM-004
crosses:
  - SVC-MBR-MEM-applications
  - SVC-MBR-MEM-commerce-participant
  - SVC-MBR-MEM-memberships
idempotency: >-
  Decision identity and supersession determine record changes. Dues placement
  uses a stable decision-based key across redelivery.
concurrency: >-
  The recording transaction locks the application by submission. Order placement
  and acknowledgement follow as separate external operations.
hops:
  - 'n': 1
    actor_or_service: Submissions engine
    action: >-
      Validate the delivered decision and invoke the Membership decision
      handler.
    anchor: >-
      services-membership:modules/applications/aws/lambda/SUBMISSION_DECISIONS.handler.ts
    seam: event
    on_failure: >-
      The delivery contract expects acknowledgement within a day and retries
      unacknowledged decisions.
    left_inconsistent: >-
      The typed request retains its previous decision state before delivery
      succeeds.
    observer: Submissions delivery evidence
    provenance: test
    source: >-
      services-membership:modules/applications/tests/unit/submissions-contracts.spec.ts#declares
      the join and the membership kinds, delivered to membership_submission
  - 'n': 2
    actor_or_service: Applications service
    action: >-
      Lock the application, apply decision identity and supersession rules, set
      the outcome status and cancel pending coverage for rejection or
      withdrawal.
    anchor: >-
      services-membership:modules/applications/services/decisions/decision-handler.ts:handleDecision
    seam: sync
    on_failure: >-
      Roll back recording failures; an unknown submission receives no
      acknowledgement.
    left_inconsistent: No partial local change remains.
    observer: Typed request record
    provenance: test
    source: >-
      services-membership:modules/applications/tests/integration/decision-handler.integration.spec.ts#cancels
      the pending term of a rejected application whose purchas
  - 'n': 3
    actor_or_service: Applications service
    action: >-
      After commit, prepare an approved purchase through the participant with
      the application reference.
    anchor: >-
      services-membership:modules/applications/services/decisions/decision-handler.ts:placeDuesOrder
    seam: sync
    on_failure: >-
      Return the preparation refusal and leave the decision unacknowledged for
      retry.
    left_inconsistent: Decision facts are committed while the required dues order is absent.
    observer: Submissions retry evidence
    provenance: unknown
    source: FND-MBR-MEM-044
  - 'n': 4
    actor_or_service: Commerce orders port
    action: >-
      Place dues through the Commerce port using the decision key and store the
      returned order reference.
    anchor: 'services-membership:modules/commerce-participant/ports/commerce-orders.ts'
    seam: sync
    on_failure: 'The default order adapter refuses, leaving acknowledgement incomplete.'
    left_inconsistent: >-
      The configured adapter cannot produce the approved request’s dues
      purchase.
    observer: Submissions retry evidence
    provenance: unknown
    source: FND-MBR-MEM-036
  - 'n': 5
    actor_or_service: Submissions port
    action: >-
      Acknowledge through Submissions and record acknowledgement only after the
      port succeeds.
    anchor: 'services-membership:modules/applications/ports/submissions.ts'
    seam: sync
    on_failure: >-
      The default acknowledgement adapter refuses; the delivery remains
      unfinished for retry.
    left_inconsistent: The engine still lacks acknowledgement of completed Membership work.
    observer: Submissions delivery evidence
    provenance: unknown
    source: FND-MBR-MEM-036
branches:
  - A chapter-change process does not place a purchase through this handler.
  - Approved purchase coverage remains pending until Commerce sends fulfilment.
waits:
  - The decision contract expects acknowledgement within one day of delivery.
evidence:
  - >-
    services-membership at 5994c270:
    modules/applications/services/decisions/decision-handler.ts; contracts/*;
    ports/submissions.ts; modules/commerce-participant/ports/commerce-orders.ts
controls: [TC-AVL-002, TC-AVL-003, TC-AVL-004, TC-AZ-001, TC-AZ-003, TC-AZ-004, TC-CHG-001, TC-CHG-002, TC-CHG-003, TC-CHG-004, TC-CRY-001, TC-CRY-002, TC-CRY-003, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-DAT-007, TC-IAM-006, TC-LOG-001, TC-LOG-002, TC-LOG-003, TC-LOG-005, TC-MON-001, TC-MON-002, TC-MON-004, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-004, TC-PI-005, TC-PRV-001, TC-PRV-002, TC-SEC-001, TC-SEC-004, TC-TEN-001, TC-TEN-002, TC-TEN-003]
---

# Act on a delivered application decision

## What It Does

The decision handler applies delivered review results to an existing typed application. It records the result, prepares and places any approved dues purchase, and acknowledges completion.

## The Flow

```mermaid
flowchart TD
  H1["Validate the delivered decision and invoke the Membership decision handler"]
  H2["Lock the application, apply decision identity and supersession rules, set the outcome status and cancel pending coverage for rejection or withdrawal"]
  H1 --> H2
  H3["After commit, prepare an approved purchase through the participant with the application reference"]
  H2 --> H3
  H4["Place dues through the Commerce port using the decision key and store the returned order reference"]
  H3 --> H4
  H5["Acknowledge through Submissions and record acknowledgement only after the port succeeds"]
  H4 --> H5
```

## When Something Fails

Unknown submissions remain unacknowledged. Local recording can commit before ordering succeeds, leaving a decided application awaiting an order. Both external ports currently refuse; repeated delivery therefore cannot complete ordinary approval and acknowledgement in the deployed wiring.

## Open Design Questions

Process outcome parameters are not applied, and the review flag rather than engine stage inspection controls approval requirements.
