feat(#13): S-12c-2 — behandel decide → domain + complete workflow task #86

Merged
not merged 5 commits from feat/13-behandel-decide into main 2026-07-16 06:53:53 +00:00
Contributor

What & why

Second half of S-12c (behandel-portal backend), completing the decision path per ADR-0013:

  • Domain: BeoordeelRegistratie now, after applying the decision (aggregate + ACL for approval), completes the open Flowable Beoordelen task for that registration (found by registrationId) with the besluit, so the workflow advances. No open task → the decision still stands (completes nothing); idempotent.
  • BFF: POST /behandel/registrations/{id}/decide behind the medewerker/behandelaar policy, forwarding goedkeuren/afwijzen to the domain. Validates the besluit vocabulary (400 on unknown) without troubling the domain.

Behavior: decide is 401 without a token, 403 without the role, 400 for an unknown besluit, 204 (forwarded) for a behandelaar.

This completes the behandel backend. S-12d (the Angular behandel-portal + Playwright e2e) closes umbrella #13 and retires the temporary /approve.

Definition of Done

  • Linked issue: #13 (umbrella, refs)
  • Tests first; red → green per layer
  • Unit + acceptance green (make unit): domain 79, bff 27, acceptance 9 (acl/event-subscriber unaffected)
  • Beoordeling acceptance scenario asserts task completion (goedkeuren + afwijzen)
  • openapi.json + api-client regenerated (drift guard passes)
  • Mutation ≥ break(90): domain 100%, bff 100%
  • CI green (pending)

Part of #13.

## What & why Second half of **S-12c** (behandel-portal backend), completing the decision path per **ADR-0013**: - **Domain:** `BeoordeelRegistratie` now, after applying the decision (aggregate + ACL for approval), **completes the open Flowable `Beoordelen` task** for that registration (found by registrationId) with the besluit, so the workflow advances. No open task → the decision still stands (completes nothing); idempotent. - **BFF:** `POST /behandel/registrations/{id}/decide` behind the medewerker/`behandelaar` policy, forwarding `goedkeuren`/`afwijzen` to the domain. Validates the besluit vocabulary (400 on unknown) without troubling the domain. Behavior: decide is **401** without a token, **403** without the role, **400** for an unknown besluit, **204** (forwarded) for a behandelaar. This completes the behandel backend. **S-12d** (the Angular behandel-portal + Playwright e2e) closes umbrella #13 and retires the temporary `/approve`. ## Definition of Done - [x] Linked issue: #13 (umbrella, `refs`) - [x] Tests first; red → green per layer - [x] Unit + acceptance green (`make unit`): domain 79, bff 27, acceptance 9 (acl/event-subscriber unaffected) - [x] Beoordeling acceptance scenario asserts task completion (goedkeuren + afwijzen) - [x] openapi.json + api-client regenerated (drift guard passes) - [x] Mutation ≥ break(90): **domain 100%, bff 100%** - [x] CI green (pending) Part of #13.
not added 5 commits 2026-07-15 10:03:28 +00:00
Red — BeoordeelRegistratie has no user-task dependency and doesn't complete the task.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
After applying the decision, BeoordeelRegistratie finds the open Beoordelen task for
the registration and completes it with the besluit so the workflow advances (ADR-0013).
No open task → the decision still stands (completes nothing). DI already provides
IUserTaskClient (S-12b).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Red — the decide endpoint does not exist yet.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Forwards a behandelaar's goedkeuren/afwijzen to the domain (which applies the decision
and completes the workflow task). Validates the besluit vocabulary (400 on unknown)
without troubling the domain. openapi.json + api-client regenerated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
test(acceptance): beoordeling scenario asserts the workflow task is completed (refs #13)
All checks were successful
CI / lint (pull_request) Successful in 1m18s
CI / build (pull_request) Successful in 1m12s
CI / unit (pull_request) Successful in 1m4s
CI / frontend (pull_request) Successful in 2m11s
CI / mutation (pull_request) Successful in 5m51s
CI / verify-stack (pull_request) Successful in 8m50s
3cb3ce6956
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
not added the type:slicearea:domainarea:portal-behandelarea:workflowarea:bff labels 2026-07-15 10:03:32 +00:00
not merged commit d226b6402d into main 2026-07-16 06:53:53 +00:00
Sign in to join this conversation.