All checks were successful
## 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%**
- [ ] CI green (pending)
Part of #13.
Reviewed-on: #86
27 lines
1.4 KiB
Gherkin
27 lines
1.4 KiB
Gherkin
# language: en
|
|
# Drives S-12 (#13). A behandelaar picks up a submitted registration for beoordeling and decides it:
|
|
# goedkeuren enters it in the register (INGESCHREVEN, the zaak's final status set via the ACL, §8.1),
|
|
# afwijzen turns it down (AFGEWEZEN). This scenario exercises the use cases against in-memory
|
|
# stand-ins for the ACL and the store; real Flowable user-task claim/complete arrives in a later
|
|
# sub-slice and is verified live.
|
|
Feature: Een registratie beoordelen
|
|
Als behandelaar wil ik een ingediende registratie beoordelen
|
|
zodat deze wordt ingeschreven of afgewezen.
|
|
|
|
Scenario: Goedkeuren schrijft de registratie in via de ACL
|
|
Given a submitted registration with an opened zaak
|
|
When the behandelaar takes it into behandeling
|
|
Then the registration has status "INBEHANDELING"
|
|
When the behandelaar decides "goedkeuren"
|
|
Then the registration has status "INGESCHREVEN"
|
|
And the zaak's final status is set via the ACL
|
|
And the beoordeling task is completed with "goedkeuren"
|
|
|
|
Scenario: Afwijzen wijst de registratie af zonder de ACL
|
|
Given a submitted registration with an opened zaak
|
|
When the behandelaar takes it into behandeling
|
|
And the behandelaar decides "afwijzen"
|
|
Then the registration has status "AFGEWEZEN"
|
|
And the ACL is not asked to set the zaak status
|
|
And the beoordeling task is completed with "afwijzen"
|