FlowableWorkflowClient speaks flowable-rest's REST API (Basic auth): start a registratie process with the registrationId variable, acquire OpenZaakAanmaken external-worker jobs and parse their registrationId, complete a job with the zaakUrl variable — the contract verified against a live engine. AclHttpClient POSTs the bsn to the ACL and returns the zaak URL. InMemoryRegistrationStore is a concurrent-dictionary upsert. OpenZaakJobProcessor drains parked jobs, opening a zaak per job and completing it, leaving failures for redelivery; OpenZaakJobPump is the hosted polling shell that drives it on an interval (ADR-0009). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
26 lines
978 B
C#
26 lines
978 B
C#
using System.Collections.Concurrent;
|
|
using Big.Application;
|
|
using Big.Domain;
|
|
|
|
namespace Big.Infrastructure;
|
|
|
|
/// <summary>
|
|
/// In-memory <see cref="IRegistrationStore"/> for the minimal slice (ADR-0009). The walking
|
|
/// skeleton's read path is the projection (S-06), not this store, so durable domain persistence is a
|
|
/// documented follow-up. Registered as a singleton so the submit endpoint and the worker share it.
|
|
/// </summary>
|
|
public sealed class InMemoryRegistrationStore : IRegistrationStore
|
|
{
|
|
private readonly ConcurrentDictionary<RegistrationId, Registration> _byId = new();
|
|
|
|
public Task SaveAsync(Registration registration, CancellationToken ct = default)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(registration);
|
|
_byId[registration.Id] = registration;
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
public Task<Registration?> GetAsync(RegistrationId id, CancellationToken ct = default)
|
|
=> Task.FromResult(_byId.GetValueOrDefault(id));
|
|
}
|