KMTS.WorkflowEngine.Generator
1.4.0-singletable.3
This is a prerelease version of KMTS.WorkflowEngine.Generator.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package KMTS.WorkflowEngine.Generator --version 1.4.0-singletable.3
NuGet\Install-Package KMTS.WorkflowEngine.Generator -Version 1.4.0-singletable.3
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.Generator" Version="1.4.0-singletable.3"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="KMTS.WorkflowEngine.Generator" Version="1.4.0-singletable.3" />
<PackageReference Include="KMTS.WorkflowEngine.Generator"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
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.Generator --version 1.4.0-singletable.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: KMTS.WorkflowEngine.Generator, 1.4.0-singletable.3"
#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.Generator@1.4.0-singletable.3
#: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.Generator&version=1.4.0-singletable.3&prerelease
#tool nuget:?package=KMTS.WorkflowEngine.Generator&version=1.4.0-singletable.3&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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:
WorkflowDefinitionsWorkflowStagesWorkflowStageActionsWorkflowTransitionsWorkflowRoles
Architecture
KMTS.WorkflowEngine/
├── Domain/ # Entities, interfaces, enums
├── Application/ # Commands, queries, services
├── Infrastructure/ # EF Core, registries, resolvers
└── Presentation/ # Endpoints, DI extensions
License
MIT License
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
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 | 41 | 2/4/2026 |
| 1.3.0-singletable.2 | 50 | 2/1/2026 |
| 1.2.0-singletable.1 | 40 | 2/1/2026 |
| 1.1.76 | 81 | 2/1/2026 |
| 1.1.75 | 91 | 2/1/2026 |
| 1.1.74 | 81 | 1/28/2026 |
| 1.1.73 | 119 | 1/27/2026 |
| 1.1.72 | 88 | 1/27/2026 |
| 1.1.71 | 88 | 1/27/2026 |