feat(workflow): diploma-eligibility DMN routes foreign diplomas via CBGV-advies (S-13, closes #14) #101

Open
not wants to merge 5 commits from feat/14-dmn-diploma-eligibility into main
Contributor

What & why

S-13: a diploma's origin decides its route. A DMN (diploma-eligibility) is evaluated inline by
the registratie process as a businessRuleTask; an exclusive gateway routes a foreign
(Buitenlands) diploma through a new CBGVAdvies user task before Beoordelen, a domestic one
straight there (PRD flow 4). The domain's only new job is carrying the diploma origin and passing it
as a process start variable.

Chose Option B (DMN in the BPMN) over the issue's literal "evaluated by the Domain Service via
Workflow Client" wording — keeps the decision a first-class workflow artefact and §8.2 clean.
Rationale in ADR-0016 (proposal #100); noted on this issue.

Closes #14

Definition of Done

  • Linked Gitea issue (above).
  • Failing test committed before the implementation.
  • Implementation makes the test pass.
  • Conventional Commits referencing the issue (refs #14).
  • CI green — all Gitea Actions jobs.
  • docker compose up from a fresh clone reaches green health checks within 3 minutes (additive; DMN deployed by flowable-init).
  • Docs updated (ADR-0016, demo note).
  • ADR added (docs/architecture/adr-0016-diploma-eligibility-dmn.md).
  • Demo note in docs/demo-script.md.

How it was built (TDD)

  • Domain: DiplomaOrigin on the aggregate + submit command; threaded through the process-start port so the Workflow Client emits a diplomaOrigin start variable. Red → green.
  • DMN + BPMN: workflows/diploma-eligibility.dmn (origin → route); businessRuleTask + exclusive gateway + CBGVAdvies user task in registratie.bpmn; DMN deployed to Flowable's DMN engine by flowable-init.
  • Both paths: Een diploma op herkomst routeren acceptance scenarios (origin carried into the process) + unit tests; verify-domain drives a foreign registration through CBGVAdvies→Beoordelen and the domestic one straight to Beoordelen — exercising both DMN branches live.

Notes for reviewers

  • Deviation from the issue's Option-A wording is deliberate and recorded (ADR-0016); the outcome is unchanged.
  • The self-service eIDAS→foreign wiring is out of scope here (this slice is area:domain + area:workflow); the domain submit accepts an optional diplomaOrigin so the foreign path is drivable.
  • Local green: domain unit 109, acceptance 15, dotnet format, Release build (0 errors), domain mutation 95.39% (break 90). The DMN/businessRuleTask REST wiring is CI-verified on verify-stack (no local full-stack run here).
## What & why S-13: a diploma's origin decides its route. A **DMN** (`diploma-eligibility`) is evaluated inline by the registratie process as a **`businessRuleTask`**; an exclusive gateway routes a **foreign** (Buitenlands) diploma through a new **CBGVAdvies** user task before `Beoordelen`, a **domestic** one straight there (PRD flow 4). The domain's only new job is carrying the diploma origin and passing it as a process start variable. Chose **Option B (DMN in the BPMN)** over the issue's literal "evaluated by the Domain Service via Workflow Client" wording — keeps the decision a first-class workflow artefact and §8.2 clean. Rationale in **ADR-0016** (proposal #100); noted on this issue. Closes #14 ## Definition of Done - [x] Linked Gitea issue (above). - [x] Failing test committed before the implementation. - [x] Implementation makes the test pass. - [x] Conventional Commits referencing the issue (`refs #14`). - [ ] CI green — all Gitea Actions jobs. - [x] `docker compose up` from a fresh clone reaches green health checks within 3 minutes (additive; DMN deployed by flowable-init). - [x] Docs updated (ADR-0016, demo note). - [x] ADR added (`docs/architecture/adr-0016-diploma-eligibility-dmn.md`). - [x] Demo note in `docs/demo-script.md`. ## How it was built (TDD) - **Domain**: `DiplomaOrigin` on the aggregate + submit command; threaded through the process-start port so the Workflow Client emits a `diplomaOrigin` start variable. Red → green. - **DMN + BPMN**: `workflows/diploma-eligibility.dmn` (origin → route); `businessRuleTask` + exclusive gateway + `CBGVAdvies` user task in `registratie.bpmn`; DMN deployed to Flowable's DMN engine by `flowable-init`. - **Both paths**: `Een diploma op herkomst routeren` acceptance scenarios (origin carried into the process) + unit tests; verify-domain drives a foreign registration through CBGVAdvies→Beoordelen and the domestic one straight to Beoordelen — exercising both DMN branches live. ## Notes for reviewers - Deviation from the issue's Option-A wording is deliberate and recorded (ADR-0016); the outcome is unchanged. - The self-service eIDAS→foreign wiring is out of scope here (this slice is area:domain + area:workflow); the domain submit accepts an optional `diplomaOrigin` so the foreign path is drivable. - Local green: domain unit 109, acceptance 15, `dotnet format`, Release build (0 errors), **domain mutation 95.39%** (break 90). The DMN/`businessRuleTask` REST wiring is CI-verified on verify-stack (no local full-stack run here).
not added 5 commits 2026-07-17 10:06:53 +00:00
Add DiplomaOrigin (Binnenlands/Buitenlands) to the Registration aggregate and
submit command, and thread it through the process-start port so the workflow's
DMN can route on it (ADR proposal #100). Failing Workflow Client test asserts the
diplomaOrigin start variable; the client takes the origin but does not emit it yet.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Workflow Client now posts diplomaOrigin alongside registrationId when starting
the process, and the domain submit endpoint accepts an optional diplomaOrigin
(defaulting to domestic) so a foreign submission can be driven end-to-end. Adds the
aggregate + submit-forwarding tests now that the plumbing is in place.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add workflows/diploma-eligibility.dmn (origin → route) and wire the registratie
BPMN: a businessRuleTask evaluates it inline and an exclusive gateway routes a
foreign diploma through a new CBGVAdvies user task before Beoordelen, a domestic
one straight there (ADR-0016). Deploy the DMN to Flowable's DMN engine and stage
both workflow files into the fl-bpmn volume.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Gherkin scenarios assert the submit carries the diploma origin (domestic/foreign)
into the process. verify-domain now submits a foreign registration and asserts it
parks at CBGVAdvies before Beoordelen, completes CBGV, then advances to Beoordelen
— exercising both DMN branches through the engine (the domestic DIRECT path is the
first registration already parking straight at Beoordelen).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
docs(workflow): ADR-0016 + demo note for diploma-eligibility DMN (S-13, refs #14)
Some checks failed
CI / lint (pull_request) Successful in 1m18s
CI / build (pull_request) Successful in 58s
CI / unit (pull_request) Successful in 1m6s
CI / frontend (pull_request) Successful in 2m36s
CI / mutation (pull_request) Successful in 5m14s
CI / verify-stack (pull_request) Failing after 4m23s
4a7dc07786
Record the DMN-as-businessRuleTask decision (from proposal #100) and add the S-13
demo walkthrough showing a foreign diploma routing through CBGV-advies.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
not added the type:slicearea:domainarea:workflow labels 2026-07-17 10:06:54 +00:00
not added this to the Iteration 2 — Flow Completeness milestone 2026-07-17 10:06:54 +00:00
Some checks failed
CI / lint (pull_request) Successful in 1m18s
Required
Details
CI / build (pull_request) Successful in 58s
Required
Details
CI / unit (pull_request) Successful in 1m6s
Required
Details
CI / frontend (pull_request) Successful in 2m36s
Required
Details
CI / mutation (pull_request) Successful in 5m14s
Required
Details
CI / verify-stack (pull_request) Failing after 4m23s
Required
Details
Some required checks were not successful.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/14-dmn-diploma-eligibility:feat/14-dmn-diploma-eligibility
git checkout feat/14-dmn-diploma-eligibility
Sign in to join this conversation.