KMTS.WorkflowEngine.Infrastructure 1.1.76

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package KMTS.WorkflowEngine.Infrastructure --version 1.1.76
                    
NuGet\Install-Package KMTS.WorkflowEngine.Infrastructure -Version 1.1.76
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="KMTS.WorkflowEngine.Infrastructure" Version="1.1.76" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KMTS.WorkflowEngine.Infrastructure" Version="1.1.76" />
                    
Directory.Packages.props
<PackageReference Include="KMTS.WorkflowEngine.Infrastructure" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add KMTS.WorkflowEngine.Infrastructure --version 1.1.76
                    
#r "nuget: KMTS.WorkflowEngine.Infrastructure, 1.1.76"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package KMTS.WorkflowEngine.Infrastructure@1.1.76
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=KMTS.WorkflowEngine.Infrastructure&version=1.1.76
                    
Install as a Cake Addin
#tool nuget:?package=KMTS.WorkflowEngine.Infrastructure&version=1.1.76
                    
Install as a Cake Tool

KMTS.WorkflowEngine

A generic, database-driven workflow engine for .NET applications.

Features

  • Database-Driven Configuration: All workflow definitions, stages, actions, and transitions are stored in the database
  • Parallel Approvals: Support for multi-approver stages with configurable consensus policies
  • ABAC Policies: Attribute-Based Access Control for fine-grained authorization
  • Lifecycle Hooks: Extensible hooks for pre/post action and stage transition events
  • Pluggable Architecture: Register custom action executors, entity handlers, rules, and conditions
  • Optimistic Concurrency: Built-in race condition protection with RowVersion
  • Audit Trail: Comprehensive workflow history with entity snapshots

Installation

dotnet add package KMTS.WorkflowEngine.Domain
dotnet add package KMTS.WorkflowEngine.Application
dotnet add package KMTS.WorkflowEngine.Infrastructure
dotnet add package KMTS.WorkflowEngine.Presentation

Quick Start

1. Register Services

// In Program.cs
builder.Services.AddWorkflowEngine(options =>
{
    // Scan for rules in your module assemblies
    options.RuleAssemblies.Add(typeof(MyActionExecutor).Assembly);
});

// Map workflow endpoints
app.MapWorkflowEngineEndpoints();

2. Implement Your Entity

public class Finding : Entity, IWorkflowEntity
{
    public int CurrentStageNumber { get; private set; }
    public string? AssignedToUserId { get; private set; }
    public string? AssignedToUserName { get; private set; }
    public string CreatedByUserId { get; private set; }

    public void TransitionToStage(int stageNumber, string userId)
    {
        CurrentStageNumber = stageNumber;
    }

    public void AssignTo(string userId, string userName)
    {
        AssignedToUserId = userId;
        AssignedToUserName = userName;
    }
}

3. Implement Action Executor

[WorkflowActionExecutor("FINDING", Priority = 100)]
public class FindingActionExecutor : IWorkflowActionExecutor
{
    public string EntityType => "FINDING";

    public Task<Result> ExecuteAsync(
        IWorkflowEntity entity,
        string actionCode,
        string userId,
        Dictionary<string, object> additionalData,
        CancellationToken ct)
    {
        var finding = (Finding)entity;

        return actionCode switch
        {
            "APPROVE" => Task.FromResult(finding.Approve(userId)),
            "REJECT" => Task.FromResult(finding.Reject(userId, GetComments(additionalData))),
            _ => Task.FromResult(Result.Failure(Error.Validation("Unknown action")))
        };
    }
}

4. Configure in Database

Insert workflow configuration into the database tables:

  • WorkflowDefinitions
  • WorkflowStages
  • WorkflowStageActions
  • WorkflowTransitions
  • WorkflowRoles

Architecture

KMTS.WorkflowEngine/
├── Domain/           # Entities, interfaces, enums
├── Application/      # Commands, queries, services
├── Infrastructure/   # EF Core, registries, resolvers
└── Presentation/     # Endpoints, DI extensions

License

MIT License

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on KMTS.WorkflowEngine.Infrastructure:

Package Downloads
KMTS.WorkflowEngine.Presentation

Presentation layer for KMTS.WorkflowEngine - ASP.NET Core endpoints and DI extensions.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.0-singletable.5 42 2/5/2026
1.4.0-singletable.3 44 2/4/2026
1.3.0-singletable.2 46 2/1/2026
1.2.0-singletable.1 41 2/1/2026
1.1.76 92 2/1/2026
1.1.75 91 2/1/2026
1.1.74 89 1/28/2026
1.1.73 129 1/27/2026
1.1.72 91 1/27/2026
1.1.71 91 1/27/2026