feat(workflow): Workflow Client reassigns beoordeling to teamlead (S-14, refs #15)
Implement the BeoordelingEscaleren escalation capability on the Flowable Workflow Client: acquire escalation jobs, find the still-open Beoordelen task in the instance and swap its candidate group behandelaar -> teamlead via task identity links, and complete the job. Segregated onto IBeoordelingEscalatieClient so the OpenZaak worker is unaffected (ADR-0015). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,3 +16,23 @@ public interface IExternalWorkerClient
|
||||
/// <summary>Complete an acquired job, passing the opened zaak URL back into the process.</summary>
|
||||
Task CompleteOpenZaakJobAsync(string jobId, Uri zaakUrl, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The escalation side of the Workflow Client (S-14): the <c>BeoordelingEscaleren</c> external-worker
|
||||
/// jobs parked by the 14-day boundary timer on <c>Beoordelen</c>, and the reassignment they drive.
|
||||
/// Kept separate from <see cref="IExternalWorkerClient"/> (interface segregation) so the OpenZaak
|
||||
/// worker never sees escalation. Implemented by <see cref="FlowableWorkflowClient"/> — the only code
|
||||
/// that talks to Flowable (§8.2, ADR-0015).
|
||||
/// </summary>
|
||||
public interface IBeoordelingEscalatieClient
|
||||
{
|
||||
/// <summary>Acquire and lock up to <paramref name="maxJobs"/> <c>BeoordelingEscaleren</c> jobs.</summary>
|
||||
Task<IReadOnlyList<EscalatieJob>> AcquireBeoordelingEscalatieJobsAsync(int maxJobs, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Reassign the still-open <c>Beoordelen</c> task in the given process instance from the
|
||||
/// behandelaar group to teamlead. Best-effort no-op if the task is no longer open.</summary>
|
||||
Task ReassignBeoordelingToTeamleadAsync(string processInstanceId, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Complete an acquired escalation job so its token reaches the escalation end event.</summary>
|
||||
Task CompleteBeoordelingEscalatieJobAsync(string jobId, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user