test(workflow): start carries diploma origin as a process variable (S-13, refs #14)

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>
This commit is contained in:
2026-07-17 11:54:28 +02:00
parent 7bcbc726ce
commit 1969297c97
8 changed files with 69 additions and 17 deletions

View File

@@ -7,10 +7,11 @@ namespace Big.Domain;
/// </summary>
public sealed class Registration
{
private Registration(RegistrationId id, string bsn)
private Registration(RegistrationId id, string bsn, DiplomaOrigin diplomaOrigin)
{
Id = id;
Bsn = bsn;
DiplomaOrigin = diplomaOrigin;
Status = RegistrationStatus.Ingediend;
}
@@ -20,6 +21,10 @@ public sealed class Registration
/// as the domain payload; the domain never constructs ZGW concepts from it (§8.1).</summary>
public string Bsn { get; }
/// <summary>Where the diploma was issued. Rides along to the process as a start variable and
/// drives the diploma-eligibility DMN's foreign→CBGV-advies routing (S-13, ADR-0016).</summary>
public DiplomaOrigin DiplomaOrigin { get; }
public RegistrationStatus Status { get; private set; }
/// <summary>The Flowable process instance driving this registration, once started.</summary>
@@ -28,11 +33,13 @@ public sealed class Registration
/// <summary>The zaak the ACL opened for this registration, once the external task has run.</summary>
public Uri? ZaakUrl { get; private set; }
/// <summary>Submit a new registration. It begins in <see cref="RegistrationStatus.Ingediend"/>.</summary>
public static Registration Submit(string bsn)
/// <summary>Submit a new registration. It begins in <see cref="RegistrationStatus.Ingediend"/>.
/// The diploma origin defaults to <see cref="DiplomaOrigin.Binnenlands"/> — the common DigiD path;
/// a foreign (eIDAS) submission passes <see cref="DiplomaOrigin.Buitenlands"/>.</summary>
public static Registration Submit(string bsn, DiplomaOrigin diplomaOrigin = DiplomaOrigin.Binnenlands)
{
ArgumentException.ThrowIfNullOrWhiteSpace(bsn);
return new Registration(RegistrationId.New(), bsn);
return new Registration(RegistrationId.New(), bsn, diplomaOrigin);
}
/// <summary>Record that the registratie workflow process has been started for this registration.</summary>