diff --git a/docs/demo-script.md b/docs/demo-script.md index a9e5396..e570024 100644 --- a/docs/demo-script.md +++ b/docs/demo-script.md @@ -5,6 +5,38 @@ copy-pasteable walkthrough against a local `make up` stack. --- +## S-05 — BIG Domain Service: submit a registration + +**Outcome:** submitting a registration starts a Flowable process; the external-task worker +opens a zaak via the ACL and records it on the aggregate — the upstream half of the skeleton +that produces the zaak S-06 then projects. + +**The path:** domain `POST /registrations` → Flowable `registratie` process → `OpenZaakAanmaken` +worker → ACL → OpenZaak; `GET /registrations/{id}` shows the opened zaak (ADR-0009). + +```bash +# 1. Bring the full stack up (seeds config, builds our services, waits for health). +make up + +# 2. Drive the full path end-to-end. This also seeds a published BIG zaaktype and points the +# ACL at it (the zaak's zaaktype URL is server-assigned, so it isn't known at bring-up). +make verify-domain # → "OK — the domain opened a zaak and recorded it on the registration" + +# 3. Submit one yourself (domain on host port 8130). Returns 202 + a Location to read back. +loc=$(curl -fsS -D - -o /dev/null -X POST http://localhost:8130/registrations \ + -H 'Content-Type: application/json' -d '{"bsn":"123456782"}' | sed -n 's/\r$//; s/^[Ll]ocation: //p') + +# 4. The worker opens the zaak off the request path (eventual consistency, ADR-0009); poll +# until zaakUrl is filled. (Step 2 must have run first, so the ACL knows the zaaktype.) +curl -fsS "http://localhost:8130$loc" | jq +# → { "registrationId": "...", "status": "Ingediend", "zaakUrl": "http://.../zaken/api/v1/zaken/" } +``` + +> Registration state is in-memory for this slice (ADR-0009); the rebuildable read model is the +> projection (S-06), fed by the very zaak this flow opens. + +--- + ## S-06 — Event Subscriber + read projection **Outcome:** a zaak created in OpenZaak flows through NRC to the Event Subscriber, which