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

Merged
not merged 9 commits from feat/14-dmn-diploma-eligibility into main 2026-07-20 07:26:53 +00:00
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`). - [x] 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)
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
not added 1 commit 2026-07-18 08:57:44 +00:00
fix(infra): deploy the DMN via the process repository, not dmn-api (S-13, refs #14)
CI / lint (pull_request) Successful in 1m13s
CI / build (pull_request) Successful in 58s
CI / unit (pull_request) Successful in 1m9s
CI / frontend (pull_request) Successful in 2m37s
CI / mutation (pull_request) Successful in 5m5s
CI / verify-stack (pull_request) Failing after 3m55s
2411e72aee
flowable/flowable-rest embeds the DMN engine but does not expose the dmn-api REST
app, so POSTing the .dmn to dmn-api/dmn-repository/deployments 404'd and
flowable-init exited 22. Deploy the .dmn through the process repository endpoint
instead; the process deployment cross-deploys the resource to the DMN engine,
where the registratie businessRuleTask resolves it by key.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
not added 1 commit 2026-07-18 09:15:49 +00:00
fix(workflow): use a DMN service task, not businessRuleTask (S-13, refs #14)
CI / build (pull_request) Successful in 58s
CI / lint (pull_request) Successful in 1m15s
CI / unit (pull_request) Successful in 1m9s
CI / frontend (pull_request) Successful in 2m28s
CI / mutation (pull_request) Successful in 5m19s
CI / verify-stack (pull_request) Failing after 7m53s
60ea61f0ed
flowable-rest's businessRuleTask parse handler binds the legacy Drools/KIE
implementation (NoClassDefFoundError: org.kie.api...AgendaFilter at deploy time),
so registratie.bpmn failed to deploy and flowable-init exited 22. Flowable's
supported inline-DMN construct is a serviceTask with flowable:type="dmn" — switch
to it. The DMN cross-deploy via the process repository (previous commit) was fine;
this was the BPMN parse. Docs/comments updated to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
not added 1 commit 2026-07-18 09:38:49 +00:00
fix(infra): deploy BPMN + DMN as one .bar so the inline decision resolves (S-13, refs #14)
CI / lint (pull_request) Successful in 1m17s
CI / build (pull_request) Successful in 55s
CI / unit (pull_request) Successful in 1m8s
CI / frontend (pull_request) Successful in 2m31s
CI / mutation (pull_request) Successful in 5m11s
CI / verify-stack (pull_request) Failing after 7m44s
d5100d9d41
The DMN service task resolves its decision scoped to the process's own deployment,
so a standalone .dmn deployment was invisible (FlowableObjectNotFoundException: No
decision found for key: diploma-eligibility). Bundle registratie.bpmn +
diploma-eligibility.dmn into a single registratie.bar and deploy it as one
deployment, giving the decision the process's parent deployment id. flowable-rest
does not expose the dmn-api app, so co-deployment is the way in.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
not added 1 commit 2026-07-20 07:05:50 +00:00
fix(infra): deploy diploma-eligibility DMN via dmn-api, not a process .bar (refs #14)
CI / lint (pull_request) Successful in 1m18s
CI / build (pull_request) Successful in 1m3s
CI / unit (pull_request) Successful in 1m9s
CI / frontend (pull_request) Successful in 2m37s
CI / mutation (pull_request) Successful in 5m27s
CI / verify-stack (pull_request) Successful in 7m39s
dc4822e53d
flowable-rest does not cascade a .dmn bundled inside a process .bar into the
DMN engine: the resource is stored but no decision is created, so the DMN
service task fails at runtime with FlowableObjectNotFoundException. Deploy the
DMN to the DMN engine via /dmn-api/dmn-repository/deployments and the BPMN to
the process engine separately; the service task resolves the decision across
deployments by key (verified live: Buitenlands->CBGV_ADVIES, Binnenlands->DIRECT).

Also move the DMN's doc comment inside <definitions>: Flowable's DMN XML
converter rejects a comment between the <?xml?> declaration and the root element
(XMLStreamReader not in START_DOCUMENT/START_ELEMENT state), unlike its BPMN one.

seed-config.sh now seeds both raw workflow files instead of building a .bar.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
not merged commit ccae27b3da into main 2026-07-20 07:26:53 +00:00
Sign in to join this conversation.