feat(workflow): document-wait task + 30-day timeout cancellation (S-10a, closes #102) #105

Merged
not merged 23 commits from feat/102-document-wait-timeout into main 2026-07-20 09:42:03 +00:00
2 changed files with 22 additions and 2 deletions
Showing only changes of commit 11ef26d8cc - Show all commits
+18 -2
View File
@@ -133,8 +133,24 @@ public sealed class Registration
Status = RegistrationStatus.Ingetrokken;
}
// A decision (or withdrawal) is only valid while the registration is still open (INGEDIEND or
// IN_BEHANDELING).
/// <summary>
/// Expire the registration — the 30-day document-wait timer fired before the required documents
/// were supplied, so the registratie process cancels the case (S-10a). Allowed while it is still
/// open (INGEDIEND or IN_BEHANDELING) and needs no zaak; a decided (INGESCHREVEN/AFGEWEZEN) or
/// withdrawn (INGETROKKEN) registration can no longer expire. Re-expiring one already
/// <see cref="RegistrationStatus.Verlopen"/> is a no-op — the worker job may be redelivered (§8.6).
/// </summary>
public void Expire()
{
if (Status == RegistrationStatus.Verlopen)
return;
RequireOpenForDecision(nameof(Expire));
Status = RegistrationStatus.Verlopen;
}
// A decision (or withdrawal, or expiry) is only valid while the registration is still open
// (INGEDIEND or IN_BEHANDELING).
private void RequireOpenForDecision(string decision)
{
if (Status is not (RegistrationStatus.Ingediend or RegistrationStatus.InBehandeling))
@@ -21,4 +21,8 @@ public enum RegistrationStatus
/// <summary>Withdrawn by the zorgprofessional before a decision (S-11). Terminal.</summary>
Ingetrokken,
/// <summary>Lapsed: the required documents were not supplied within the 30-day window, so the
/// registratie process cancelled the case (S-10a). Terminal.</summary>
Verlopen,
}