Introduction
Elsa is a workflow engine for .NET that supports building long-running, stateful workflows. Developers can define workflows in C# code, JSON, or through a built-in visual designer. It handles orchestration of HTTP endpoints, timers, events, and custom activities.
What Elsa Does
- Executes long-running workflows with persistence and resumption across restarts
- Provides a visual drag-and-drop workflow designer accessible via web browser
- Supports code-first workflow definitions using a fluent C# API
- Offers built-in activities for HTTP requests, timers, email, and JavaScript evaluation
- Triggers workflows from HTTP endpoints, message queues, cron schedules, or custom events
Architecture Overview
Elsa separates workflow definitions from runtime execution. Definitions are stored as JSON or compiled from C# code, and the runtime engine manages instances, bookmarks, and resumption points. A persistence layer supports EF Core, MongoDB, or custom providers. The workflow designer is a Blazor-based SPA that communicates with the engine via REST APIs.
Self-Hosting & Configuration
- Install via NuGet:
dotnet add package Elsaplus activity packages likeElsa.HttporElsa.Email - Register Elsa services in
Program.cswithbuilder.Services.AddElsa() - Configure persistence with SQLite, SQL Server, PostgreSQL, or MongoDB
- Mount the workflow designer UI with
app.UseElsaStudio()for visual editing - Deploy as a standard ASP.NET Core application behind any reverse proxy
Key Features
- Visual designer for non-developers to create and modify workflows
- Code-first and designer-first workflows can coexist in the same application
- Versioned workflow definitions with rollback support
- Built-in activity library covering HTTP, scripting, branching, and looping
- Extensible with custom activities written in C#
Comparison with Similar Tools
- Temporal — Language-agnostic durable execution; Elsa is .NET-native with a visual designer
- n8n — Node.js workflow automation; Elsa integrates directly into .NET applications
- Camunda — Java-based BPMN engine; Elsa is lighter weight and C#-native
- Conductor (Netflix) — Microservice orchestrator; Elsa targets .NET monoliths and modular apps
FAQ
Q: Can workflows survive application restarts? A: Yes, Elsa persists workflow state and bookmarks to a database and resumes automatically.
Q: Is the visual designer included? A: Yes, the Elsa Studio designer is included as a NuGet package and runs as a Blazor WebAssembly app.
Q: Can I run Elsa without the designer? A: Yes, you can define workflows entirely in C# code and run them headlessly.
Q: What .NET versions are supported? A: Elsa 3.x targets .NET 8 and later.