using Big.Application; namespace Big.Infrastructure; /// /// The worker-facing side of the Workflow Client: acquiring and completing Flowable external-worker /// jobs (ADR-0009). Kept separate from the Application's because job /// acquisition is a Flowable-specific polling mechanic the application never needs to know about. /// Implemented by — the only code that talks to Flowable (§8.2). /// public interface IExternalWorkerClient { /// Acquire and lock up to OpenZaakAanmaken jobs. Task> AcquireOpenZaakJobsAsync(int maxJobs, CancellationToken ct = default); /// Complete an acquired job, passing the opened zaak URL back into the process. Task CompleteOpenZaakJobAsync(string jobId, Uri zaakUrl, CancellationToken ct = default); } /// /// The escalation side of the Workflow Client (S-14): the BeoordelingEscaleren external-worker /// jobs parked by the 14-day boundary timer on Beoordelen, and the reassignment they drive. /// Kept separate from (interface segregation) so the OpenZaak /// worker never sees escalation. Implemented by — the only code /// that talks to Flowable (§8.2, ADR-0015). /// public interface IBeoordelingEscalatieClient { /// Acquire and lock up to BeoordelingEscaleren jobs. Task> AcquireBeoordelingEscalatieJobsAsync(int maxJobs, CancellationToken ct = default); /// Reassign the still-open Beoordelen task in the given process instance from the /// behandelaar group to teamlead. Best-effort no-op if the task is no longer open. Task ReassignBeoordelingToTeamleadAsync(string processInstanceId, CancellationToken ct = default); /// Complete an acquired escalation job so its token reaches the escalation end event. Task CompleteBeoordelingEscalatieJobAsync(string jobId, CancellationToken ct = default); }