FlowOrchestrator

Code-first workflow orchestration for .NET — runs on Hangfire, in-process, or Azure Service Bus.

Define multi-step background workflows as plain C# classes. Connect them with runAfter dependencies. Run them on SQL Server, PostgreSQL, or in-memory. Monitor everything from a built-in dashboard.

Get Started API Reference


Why FlowOrchestrator?

No YAML. No JSON files.

Flows are C# classes — refactorable, IDE-navigable, and version-controlled alongside the code they orchestrate.

Three runtime adapters

Hangfire (production default — durable job execution you already trust), InMemory (Channel<T>-backed, zero-infra dev mode), or Azure Service Bus (cloud-native multi-replica with self-perpetuating scheduled cron messages). Same flow code on all three.

Three trigger types

Manual (dashboard/API), Cron (recurring schedule), and Webhook (external HTTP POST) — declared in the same manifest, no extra config.

DAG execution planner

runAfter dependencies power fan-out, fan-in, and conditional branching. Multiple entry steps run in parallel automatically.

Built-in polling

PollableStepHandler<T> waits for external systems without holding a thread. Hangfire reschedules after each interval, with configurable timeout and min-attempt guards.

One dashboard, full history

Step-by-step timeline, input/output capture, retry button for failed steps, cooperative cancellation, and schedule management — all at /flows.


Install

dotnet add package FlowOrchestrator.Core
dotnet add package FlowOrchestrator.Hangfire
dotnet add package FlowOrchestrator.SqlServer      # or .PostgreSQL / .InMemory
dotnet add package FlowOrchestrator.Dashboard      # optional REST API + SPA
// 1. Register Hangfire (required separately before FlowOrchestrator)
builder.Services.AddHangfire(c => c.UseSqlServerStorage(connectionString));
builder.Services.AddHangfireServer();

// 2. Register FlowOrchestrator
builder.Services.AddFlowOrchestrator(options =>
{
    options.UseSqlServer(connectionString);
    options.UseHangfire();
    options.AddFlow<MyFlow>();
});

// 3. Register step handlers
builder.Services.AddStepHandler<MyStepHandler>("MyStepType");

// 4. Map the dashboard (optional)
app.MapFlowDashboard("/flows");

Packages

Package Purpose NuGet
FlowOrchestrator.Core Abstractions and execution engine NuGet
FlowOrchestrator.Hangfire Hangfire bridge and DI registration NuGet
FlowOrchestrator.SqlServer SQL Server persistence (Dapper) NuGet
FlowOrchestrator.PostgreSQL PostgreSQL persistence (Npgsql) NuGet
FlowOrchestrator.InMemory In-process storage (dev/testing) NuGet
FlowOrchestrator.Dashboard REST API + embedded SPA NuGet

All packages target net8.0, net9.0, and net10.0. MIT license.