feat(domain): withdrawal cancels the registratie process via a BPMN message event (refs #12)

Add an interrupting message boundary event (RegistratieIngetrokken) on the Beoordelen task that

ends the process; the Workflow Client delivers the message to the task's execution, and the

withdraw handler triggers it best-effort after the domain transition (ADR-0014).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-16 11:29:56 +02:00
parent 2a6874ef6d
commit edffbb4575
4 changed files with 76 additions and 13 deletions

View File

@@ -54,11 +54,18 @@ public interface IUserTaskClient
/// <summary>Complete a beoordeling task, carrying the decision into the process as the
/// <c>besluit</c> variable so the workflow can continue on the chosen branch.</summary>
Task CompleteBeoordelingAsync(string taskId, BeoordelingsBesluit besluit, CancellationToken ct = default);
/// <summary>Deliver the withdrawal message to a <c>Beoordelen</c> task's execution, tripping the
/// process's interrupting message boundary event so the registratie process cancels (S-11,
/// ADR-0014). The registration itself is already INGETROKKEN in the domain; this ends its
/// workflow so the case leaves the werkbak.</summary>
Task WithdrawBeoordelingAsync(string executionId, CancellationToken ct = default);
}
/// <summary>A <c>Beoordelen</c> user task in the werkbak: the Flowable task id (needed to claim and
/// complete it) and the registration it carries as a process variable.</summary>
public sealed record BeoordelingTask(string TaskId, RegistrationId RegistrationId);
/// complete it), the execution it runs in (needed to deliver the withdrawal message to its boundary
/// event), and the registration it carries as a process variable.</summary>
public sealed record BeoordelingTask(string TaskId, string ExecutionId, RegistrationId RegistrationId);
/// <summary>
/// Persistence port for the <see cref="Registration"/> aggregate. In-memory for the minimal slice