EricksonLopez.Processes Overview
EricksonLopez.Processes (2.0.0 on NuGet, L4, 4,935 downloads) orchestrates long-running Sagas and Process Managers with immutable IProcessState records, optimistic concurrency retries, LIFO CompensationStep / CompensationAction stacks, and storage providers for PostgreSQL, SQL Server, SQLite, MySQL, MariaDB, and Oracle.
- Pure state-transition functions: Handlers implement
IProcessHandler<TState, TEvent>andICompensationHandler<TState>, returningProcessTransitionResult<TState>(Advance,Suspend,Complete,Compensate,Compensated,Fail) without performing direct database I/O inside transition methods. - Terminal-state & compensation bounds (
v2.0.0):ProcessInstance<TState>.Advanceforbids advancing terminal instances (Completed,Compensated,Failed) and caps compensation stacks at1000steps by default (BC-002,BC-003). - Package scope accuracy: All
16packages are published (2.0.0). There is no EF Core package indotnet-processes; the sole runtimeIncompatiblepackage isEricksonLopez.Processes.Storage.Oracle. - TFM note: Local
.csproj(3.0.0HEAD) targetsnet10.0(netstandard2.0forAnalyzers/Generator), whereas published2.0.0NuGet packages targetednet8.0;net9.0;net10.0.
Rendering diagram…
flowchart LR Evt["Incoming Event + IProcessCorrelation"] --> Coord["ProcessCoordinator<TState>"] Coord --> Store["IProcessStore<TState> (PostgreSQL / SqlServer / Sqlite / ...)"] Coord --> Handler["[SagaDefinition] IProcessHandler / ICompensationHandler"] Handler --> Res["ProcessTransitionResult (Advance / Complete / Compensate / Compensated)"] Res --> Eff["ProcessEffect -> Outbox / Mediator / Events"]
View accessible text summary and structure
ProcessCoordinator loads state via IProcessStore, invokes IProcessHandler or ICompensationHandler, persists atomically with optimistic concurrency retries, and emits ProcessEffect intents via Outbox/Mediator/Events.
flowchart LR
Evt["Incoming Event + IProcessCorrelation"] --> Coord["ProcessCoordinator<TState>"]
Coord --> Store["IProcessStore<TState> (PostgreSQL / SqlServer / Sqlite / ...)"]
Coord --> Handler["[SagaDefinition] IProcessHandler / ICompensationHandler"]
Handler --> Res["ProcessTransitionResult (Advance / Complete / Compensate / Compensated)"]
Res --> Eff["ProcessEffect -> Outbox / Mediator / Events"]Package Roster & Native AOT Status (16 / 16 Published)
Section titled “Package Roster & Native AOT Status (16 / 16 Published)”All 16 packages are published at 2.0.0 on NuGet (localVersion: 3.0.0 on disk). Overall AOT status is Partial (13 Full, 1 Incompatible, 2 NotApplicable):
- Core, DI & Integrations (
FullAOT,2.0.0):Processes(381dl),Abstractions(535),DependencyInjection(260),Outbox(614),Mediator(270),Events(255),SystemTextJson(256),Testing(273). - SQL Storage Providers (
FullAOT,2.0.0):Storage.PostgreSql(271),Storage.MariaDb(270),Storage.MySql(267),Storage.Sqlite(264),Storage.SqlServer(249). - Incompatible Storage (
IsAotCompatible=false,2.0.0):EricksonLopez.Processes.Storage.Oracle(263dl —Oracle.ManagedDataAccess.Corereflection marshaling). - Roslyn Tools (
NotApplicable,2.0.0,netstandard2.0):Analyzers(257,PROC001–PROC003),Generator(250,ProcessSourceGenerator).
Measured directly from BenchmarkDotNet.Artifacts (5 / 5 measured rows in ProcessBenchmarks, DefaultJob, .NET 10.0.11 X64 RyuJIT x86-64-v4, AMD Ryzen 7 9800X3D; no NativeAOT reports):
Benchmark_SagaCompensation_ExecutionAsync: 19.64 ns / 136 BBenchmark_ProcessId_NewId: 60.04 ns / 0 BBenchmark_SystemTextJson_Serialize: 68.52 ns / 104 BBenchmark_SystemTextJson_Deserialize: 174.74 ns / 256 BBenchmark_ProcessCoordinator_ExecuteAsync: 350.96 ns / 888 B