Filter by title

Elsa Module (Pro)

You must have an ABP Team or a higher license to use this module.

This module integrates Elsa Workflows into ABP Framework applications and is designed to make it easy for developers to use Elsa's capabilities within their ABP-based projects. For creating, managing, and customizing workflows themselves, please refer to the official Elsa documentation.

How to Install

The Elsa module is not installed in the startup templates by default and must be installed manually. There are two ways of installing a module into your application and each one of these approaches is explained in the next sections.

Using ABP CLI

ABP CLI allows adding a module to a solution using the add-module command. You can check its documentation for more information. So, the Elsa module can be added using the following command:

abp add-module Volo.Elsa

Manual Installation

If you modified your solution structure, adding the module using ABP CLI might not work for you. In such cases, you can add the Elsa module into your solution manually.

In order to do that, add packages listed below to the matching project in your solution. For example, Volo.Abp.Elsa.Application package to your {ProjectName}.Application.csproj as shown below:

<PackageReference Include="Volo.Abp.Elsa.Application" Version="x.x.x" />

After adding the package references, open the module class of the project (e.g.: {ProjectName}ApplicationModule) and add the code below to the DependsOn attribute:

[DependsOn(
  //...
  typeof(AbpElsaApplicationModule)
)]

If you are using Blazor Web App, you need to add the Volo.Elsa.Admin.Blazor.WebAssembly package to the {ProjectName}.Blazor.Client.csproj project and add the Volo.Elsa.Admin.Blazor.Server package to the {ProjectName}.Blazor.csproj project.

AbpElsaAspNetCoreModule and AbpElsaIdentityModule

These two modules generally will be added to your authentication project. Please add Volo.Elsa.Abp.AspNetCore and Volo.Elsa.Abp.Identity packages to your project and add the AbpElsaAspNetCoreModule and AbpElsaIdentityModule to the DependsOn attribute of your module class based on your project structure:

<PackageReference Include="Volo.Abp.Elsa.AspNetCore" Version="x.x.x" />
<PackageReference Include="Volo.Abp.Elsa.Identity" Version="x.x.x" />
[DependsOn(
  //...
  typeof(AbpElsaAspNetCoreModule),
  typeof(AbpElsaIdentityModule)
)]

The Elsa Module

The Elsa Workflows has its own database provider, and also has a Tenant/Role/User system. They are under active development, so the ABP Elsa module is not yet fully integrated. Below is the current status of each module in the ABP's Elsa Module:

  • AbpElsaAspNetCoreModule(Volo.Elsa.Abp.AspNetCore) module is used to integrate Elsa authentication.
  • AbpElsaIdentityModule(Volo.Elsa.Abp.Identity) module is used to integrate ABP Identity authentication.
  • AbpElsaApplicationModule(Volo.Elsa.Abp.Application) and AbpElsaApplicationContractsModule(Volo.Elsa.Abp.Application.Contracts) modules are used to define the Elsa permissions.

The rest of the projects/modules are basically empty and will be implemented in the future based on the Elsa features:

  • AbpElsaDomainModule(Volo.Elsa.Abp.Domain)
  • AbpElsaEntityFrameworkCoreModule(Volo.Elsa.Abp.EntityFrameworkCore)
  • AbpElsaHttpApiModule(Volo.Elsa.Abp.HttpApi)
  • AbpElsaHttpApiClientModule(Volo.Elsa.Abp.HttpApi.Client)
  • AbpElsaBlazorModule(Volo.Elsa.Abp.Blazor)
  • AbpElsaBlazorServerModule(Volo.Elsa.Abp.Blazor.Server)
  • AbpElsaBlazorWebAssemblyModule(Volo.Elsa.Abp.Blazor.WebAssembly)
  • AbpElsaWebModule(Volo.Elsa.Abp.Web)

Configure the Elsa Server

You need to configure Elsa in your ABP application to use its features. You can do that in the ConfigureServices method of your YourElsaAppModule class as shown below:

For more information about configuring Elsa, please refer to the official Elsa documentation.

private void ConfigureElsa(ServiceConfigurationContext context, IConfiguration configuration)
{
    var connectionString = configuration.GetConnectionString("Default")!;
    context.Services
        .AddElsa(elsa => elsa
            .UseAbpIdentity(identity => // Use UseAbpIdentity instead of UseIdentity to integrate with ABP Identity module
            {
                identity.TokenOptions = options => options.SigningKey = "large-signing-key-for-signing-JWT-tokens";
            })
            .UseWorkflowManagement(management => management.UseEntityFrameworkCore(ef => ef.UseSqlServer(connectionString)))
            .UseWorkflowRuntime(runtime => runtime.UseEntityFrameworkCore(ef => ef.UseSqlServer(connectionString)))
            .UseScheduling()
            .UseJavaScript()
            .UseLiquid()
            .UseCSharp()
            .UseHttp(http => http.ConfigureHttpOptions = options => configuration.GetSection("Http").Bind(options))
            .UseWorkflowsApi()
            .AddActivitiesFrom<YourElsaAppModule>()
            .AddWorkflowsFrom<YourElsaAppModule>()
        );
}

Elsa Database Migration

Elsa module uses its own database context and migration system, ABP Elsa module doesn't contain any aggregate root/entity at the moment. So, you don't need to create any initial migration for Elsa module. You just need to configure the Elsa Services as follows:

.UseWorkflowManagement(management => management.UseEntityFrameworkCore(ef => ef.UseSqlServer(connectionString)))
.UseWorkflowRuntime(runtime => runtime.UseEntityFrameworkCore(ef => ef.UseSqlServer(connectionString)))

When you run your application, Elsa will create its own database tables if they do not exist.

See how to configure Elsa Workflows to use different database providers for persistence, including SQL Server, PostgreSQL, and MongoDB for more information.

Elsa Module Permissions

The Elsa Workflow API endpoints check permissions. Also, it has a * wildcard permission to allow all permissions.

The ABP Elsa module defines all permissions that are used in the Elsa workflow. You can use ABP Permission Management module to manage the permissions.

AbpElsaAspNetCoreModule(Volo.Elsa.Abp.AspNetCore) module will check and add these permissions to the current user's claims:

Elsa Permissions

You can also grant parts of the permissions to a role or user. It will add the permissions claims to the current user's Cookies or Token. Elsa Server will read the claims and allow or deny access:

Elsa Part Permissions

Elsa Studio

Elsa Studio is a standalone web application that allows you to design, manage, and execute workflows. It is built using Blazor Server/WebAssembly.

ElsaDemoApp.Studio.WASM is a sample Blazor WebAssembly project that demonstrates how to use Elsa Studio with ELSA Server with ABP Framework.

Elsa Studio has its own layout and theme, and you can't integrate it into an ABP Blazor project for now.

Elsa Studio

Please check the Elsa Workflows - Sample Workflow Demo document to download its source code for review.

Elsa Studio Authentication

Elsa Studio requires authentication and there are two ways to authenticate Elsa Studio:

  • Password Flow Authentication
  • Code Flow Authentication
Elsa Studio - Password Flow Authentication

The AbpElsaIdentityModule(Volo.Elsa.Abp.Identity) module is used to integrate with ABP Identity module to check Elsa Studio username and password against ABP Identity.

You need to replace UseIdentity with UseAbpIdentity when configuring Elsa in your Elsa server project as follows:

context.Services
    .AddElsa(elsa => elsa
        .UseAbpIdentity(identity =>
        {
            identity.TokenOptions = options => options.SigningKey = "large-signing-key-for-signing-JWT-tokens";
        });
    );

After that, you can add the below code to use Identity as the login method in your Elsa Studio client project:

builder.Services.AddLoginModule().UseElsaIdentity();

Then, you can log in to the Elsa Studio application with the default credentials (admin as the username, and 1q2w3E* as the password):

elsa-login

Once, you logged in to the application, you can start defining workflows, manage them and see their execution instances and more:

elsa-main

Elsa Studio - Code Flow Authentication

ABP applications use OpenIddict for authentication. So, you can use the Authorization Code Flow to authenticate Elsa Studio.

To do that, you can add the code block below to your Elsa Studio client project:

builder.Services.AddLoginModule().UseOpenIdConnect(connectConfiguration =>
{
    var authority = configuration["AuthServer:Authority"]!.TrimEnd('/'); // Your Server URL
    connectConfiguration.AuthEndpoint = $"{authority}/connect/authorize";
    connectConfiguration.TokenEndpoint = $"{authority}/connect/token";
    connectConfiguration.EndSessionEndpoint = $"{authority}/connect/endsession";
    connectConfiguration.ClientId = configuration["AuthServer:ClientId"]!;
    connectConfiguration.Scopes = ["openid", "profile", "email", "phone", "roles", "offline_access", "ElsaDemoAppServer"];
});

After that, Elsa Studio will redirect to your ABP application's login page, then redirect back to Elsa Studio after the successful login.

Elsa Workflows - Sample Workflow Demo

ABP provides a complete demo application that shows how to use the Elsa module in your ABP application. You can download the demo application and see the integration points, if you stuck at any point. Please see the Elsa Workflows - Sample Workflow Demo page for more information.

Contributors


Last updated: December 08, 2025 Edit this page on GitHub

Was this page helpful?

Please make a selection.

To help us improve, please share your reason for the negative feedback in the field below.

Please enter a note.

Thank you for your valuable feedback!

Please note that although we cannot respond to feedback, our team will use your comments to improve the experience.

ABP Community Talks
AI-Powered .NET Apps with ABP & Microsoft Agent Framework
18 Dec, 17:00
Online
Watch the Event
ABP Live Webinar
Webinar Calendar Webinar Calendar
Discover
ABP Platform
Register Now
Jan 07
Wednesday,
17:00 UTC
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.