Zero-dependency workflow orchestration for .NET with microsecond-level performance
True Zero Dependencies: Core package with no external dependencies, small footprint
Measured Performance: Microsecond-level per-operation execution (medians ~14–36 μs; typical range ~14–80 μs). See benchmarks.
Production Ready: Built-in compensation (saga pattern), observability via extensions
Developer First: Fluent API, clear metaphor, extensive samples
dotnet add package WorkflowForge
using WorkflowForge;
var workflow = WorkflowForge.CreateWorkflow()
.WithName("ProcessOrder")
.AddOperation("ValidateOrder", async (order, foundry, ct) =>
{
foundry.Logger.LogInformation("Validating order {OrderId}", order.Id);
return await ValidateOrderAsync(order, ct);
})
.AddOperation("ProcessPayment", async (order, foundry, ct) =>
{
foundry.Logger.LogInformation("Processing payment for order {OrderId}", order.Id);
return await ProcessPaymentAsync(order, ct);
})
.Build();
using var foundry = WorkflowForge.CreateFoundry("ProcessOrder");
using var smith = WorkflowForge.CreateSmith();
await smith.ForgeAsync(workflow, foundry);
Best way to learn → Run 22 progressive examples from basic to advanced:
cd src/samples/WorkflowForge.Samples.BasicConsole
dotnet run
Browse all examples: src/samples/WorkflowForge.Samples.BasicConsole/
Complete guides and reference → docs/ folder contains:
- Getting Started Guide - Step-by-step tutorial
- Architecture Overview - Core design principles
- API Reference - Complete API documentation
- Extensions Guide - Available extensions
Add capabilities without dependencies → Optional extensions available:
Extension | Purpose | Package |
---|---|---|
Serilog Logging | Structured logging | WorkflowForge.Extensions.Logging.Serilog |
Polly Resilience | Circuit breakers, retries | WorkflowForge.Extensions.Resilience.Polly |
Performance Monitoring | Metrics & profiling | WorkflowForge.Extensions.Observability.Performance |
Health Checks | Application health | WorkflowForge.Extensions.Observability.HealthChecks |
OpenTelemetry | Distributed tracing | WorkflowForge.Extensions.Observability.OpenTelemetry |
Complete Extensions Documentation: docs/extensions.md
Metric | Performance | Context |
---|---|---|
Operation Execution | Microsecond-level (median ~14–36 μs) | Per-operation timing (see OperationPerformance benchmarks) |
Foundry Creation | ~5–7 μs median (means ~13–16 μs) | Setup time (ConfigurationProfiles benchmarks) |
Parallel Throughput | Improves with concurrent execution | See throughput benchmarks |
Memory Footprint | ≈2.2 KB per foundry; ≈0.9–2.3 KB per operation | Allocations from benchmarks |
Detailed Benchmarks & Analysis: src/benchmarks/WorkflowForge.Benchmarks/
WorkflowForge uses an industrial metaphor for intuitive understanding:
- The Forge - Main factory creating workflows and components
- Foundries - Execution environments where operations are performed
- Smiths - Orchestration engines managing workflow execution
- Operations - Individual tasks within workflows
Resource | Description |
---|---|
Getting Started | Step-by-step tutorial |
Interactive Samples | 22 hands-on examples |
Complete Documentation | Comprehensive guides |
Extensions | Available extensions |
Benchmarks | Performance analysis |
git clone https://github.com/animatlabs/workflow-forge.git
cd workflow-forge
dotnet restore && dotnet build && dotnet test
Contributing Guidelines | License: MIT
WorkflowForge - Build workflows with industrial strength