1.9 KiB
1.9 KiB
WP-50 — OpenZaak create-zaak (first write slice)
Status: done (de3bff0)
Phase: 9 — OpenZaak / ZGW integration
Why
WP-49 made the cases read path source-swappable. The next slice is the first write: create a Zaak in OpenZaak when an aanvraag is submitted, still behind the config gate, still without changing the FE contract.
Read first
- openzaak-integration.md — "How to add the next slice"
- ADR-0005, ADR-0001
Decisions (pre-made, don't relitigate)
- Route the create through the existing submit/mutation seam; keep the FE response DTO identical.
- A create needs a
zaaktypeURL from Catalogi (OpenZaak validates it by fetching) — map the aanvraagtype→ a configured zaaktype URL. - Follow the create with a
status+ arol(initiator/betrokkene by BSN) as ZGW expects.
Files
- Extend
IZaakSource(or add a write method) +OpenZaakZaakSource;LocalZaakSourcekeeps the current local submit. ZgwOptions: atype → zaaktype URLmap +bronorganisatie/verantwoordelijkeOrganisatie(RSIN).
Steps
- Add
CreateZaakto the source seam; local impl = current submit, OpenZaak impl = POST to ZRC. - Map aanvraag
type→ zaaktype URL; POST zaak, then status + rol. - Map the created Zaak back into the existing submit response DTO.
Acceptance criteria
- Submitting with
Zgw:Enabled=truecreates a Zaak (+ status + rol) in OpenZaak. - FE submit response DTO unchanged; no api-client drift.
- Covered by tests (stub handler asserts the POST bodies + type→zaaktype mapping).
Verification
dotnet test; against a docker OpenZaak if available.
Out of scope
Documenten (WP-51), Notificaties (WP-52).
Risks
Create needs read scope on Catalogi (type-URL validation) — provision AC scopes accordingly.