Skip to content

animatlabs/workflow-forge

Repository files navigation

WorkflowForge - A forge for workflows

Zero-dependency workflow orchestration for .NET with microsecond-level performance

NuGet GitHub Repository License: MIT .NET Standard 2.0

What Makes WorkflowForge Different?

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

Quick Start

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);

Learn & Explore

Start Here: Interactive Samples

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/

Documentation Hub

Complete guides and referencedocs/ folder contains:

Extensions Ecosystem

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

Performance Characteristics

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/

Industrial Metaphor

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

Quick Links

Resource Description
Getting Started Step-by-step tutorial
Interactive Samples 22 hands-on examples
Complete Documentation Comprehensive guides
Extensions Available extensions
Benchmarks Performance analysis

Building & Contributing

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

About

WorkflowForge - A forge for workflows

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published