Slickflow.Engine 3.5.0

dotnet add package Slickflow.Engine --version 3.5.0
                    
NuGet\Install-Package Slickflow.Engine -Version 3.5.0
                    
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="Slickflow.Engine" Version="3.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Slickflow.Engine" Version="3.5.0" />
                    
Directory.Packages.props
<PackageReference Include="Slickflow.Engine" />
                    
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 Slickflow.Engine --version 3.5.0
                    
#r "nuget: Slickflow.Engine, 3.5.0"
                    
#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 Slickflow.Engine@3.5.0
                    
#: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=Slickflow.Engine&version=3.5.0
                    
Install as a Cake Addin
#tool nuget:?package=Slickflow.Engine&version=3.5.0
                    
Install as a Cake Tool

Slickflow.Engine

Open Source Workflow Engine for .NET

Slickflow.Engine is a powerful, enterprise-grade workflow engine built for .NET applications. It provides comprehensive BPMN 2.0 workflow management capabilities with advanced features including AI-powered workflow generation, multi-database support, and extensible architecture.

🚀 Features

  • BPMN 2.0 Compliant: Full support for BPMN 2.0 workflow definitions
  • AI-Powered Workflow Generation: Generate BPMN flowcharts from text descriptions using Large Language Models
  • Multi-Database Support: Works with SQL Server, MySQL, PostgreSQL, Oracle, and MongoDB
  • Image Classification: AI-powered image classification for workflow automation
  • RAG-Enhanced Retrieval: Vector database integration for intelligent knowledge retrieval
  • Enterprise Ready: Production-tested with comprehensive error handling and logging

📦 Installation

Install the package via NuGet Package Manager:

Install-Package Slickflow.Engine

Or via .NET CLI:

dotnet add package Slickflow.Engine

Or via PackageReference in your .csproj file:

<PackageReference Include="Slickflow.Engine" Version="3.5.0" />

🎯 Quick Start

1. Configure Database Connection

Add your database connection string to appsettings.json:

{
  "ConnectionStrings": {
    "WfDBConnectionType": "PGSQL",
    "WfDBConnectionString": "Server=127.0.0.1;Port=5432;Database=wfdbbpmn2;User Id=postgres;Password=123456;TimeZone=UTC;"
  },
}

Supported database types:

  • SQLSERVER - Microsoft SQL Server
  • MYSQL - MySQL Database
  • PGSQL - PostgreSQL Database
  • ORACLE - Oracle Database

2. Initialize the Workflow Service

using Slickflow.Engine.Service;
using Slickflow.Data;

// Initialize database connection
DBTypeExtenstions.InitConnectionString("PGSQL", connectionString);

// Create workflow service instance
IWorkflowService workflowService = new WorkflowService();

3. Basic Workflow Operations

Get Process List
// Get all process definitions
var processList = workflowService.GetProcessListSimple();
Console.WriteLine($"Found {processList.Count} processes");
Start a Workflow Instance
using Slickflow.Engine.Common;

// Start a new workflow instance
var runner = new WfAppRunner
{
    AppName = "My Application",
    AppInstanceID = "app-instance-001",
    ProcessID = "your-process-id",
    Version = "1",
    UserID = "user123",
    UserName = "John Doe"
};

var startResult = workflowService.StartProcess(runner);

if (startResult.Status == WfExecutedStatus.Success)
{
    Console.WriteLine($"Workflow instance started: {startResult.InstanceID}");
}
Run a Workflow Step
using Slickflow.Engine.Common;

// Run a workflow step (execute a task)
var runner = new WfAppRunner
{
    AppName = "My Application",
    AppInstanceID = "app-instance-001",
    ProcessID = "your-process-id",
    Version = "1",
    UserID = "user123",
    UserName = "John Doe",
    TaskID = 123  // Task ID to execute
};

var runResult = workflowService.RunProcess(runner);

if (runResult.Status == WfExecutedStatus.Success)
{
    Console.WriteLine($"Workflow step executed successfully");
}
Get Task List
using Slickflow.Engine.Business.Entity;

// Get running tasks for a user
var taskQuery = new TaskQuery
{
    UserId = "user123",
    UserName = "John Doe"
};

var runningTasks = workflowService.GetRunningTasks(taskQuery);
foreach (var task in runningTasks)
{
    Console.WriteLine($"Running Task: {task.TaskName}, Process: {task.ProcessName}");
}

// Get ready tasks (pending tasks)
var readyTasks = workflowService.GetReadyTasks(taskQuery);
foreach (var task in readyTasks)
{
    Console.WriteLine($"Ready Task: {task.TaskName}, Process: {task.ProcessName}");
}

// Get completed tasks
var completedTasks = workflowService.GetCompletedTasks(taskQuery);
foreach (var task in completedTasks)
{
    Console.WriteLine($"Completed Task: {task.TaskName}, Process: {task.ProcessName}");
}
Get Process Instance
// Get process instance by process instance ID
int processInstanceId = 123;
var processInstance = workflowService.GetProcessInstance(processInstanceId);
if (processInstance != null)
{
    Console.WriteLine($"Process: {processInstance.ProcessName}, State: {processInstance.ProcessState}");
}

// Get process instances by application instance ID (returns list)
string appInstanceId = "app-instance-001";
var processInstances = workflowService.GetProcessInstance(appInstanceId);
foreach (var instance in processInstances)
{
    Console.WriteLine($"Process Instance ID: {instance.Id}, Process: {instance.ProcessName}");
}

🔧 Core Interfaces

IWorkflowService

The main interface for workflow operations. Key methods include:

  • GetProcessListSimple() - Retrieve all process definitions
  • StartProcess(WfAppRunner) - Start a new workflow instance
  • RunProcess(WfAppRunner) - Execute workflow step (recommended)
  • RunProcessApp(WfAppRunner) - Execute workflow step (obsolete, use RunProcess instead)
  • GetRunningTasks(TaskQuery) - Get running tasks for a user
  • GetReadyTasks(TaskQuery) - Get ready (pending) tasks for a user
  • GetCompletedTasks(TaskQuery) - Get completed tasks for a user
  • GetProcessInstance(int processInstanceId) - Get process instance by process instance ID
  • GetProcessInstance(string appInstanceId) - Get process instances by application instance ID (returns list)

WorkflowService

The default implementation of IWorkflowService. Use dependency injection for better testability:

// Register in DI container (e.g., in Startup.cs or Program.cs)
services.AddScoped<IWorkflowService, WorkflowService>();

🤖 AI Features (Version 3.5.0)

Slickflow.Engine 3.5.0 introduces AI-powered features that enhance workflow automation:

1. Text-to-BPMN Flowchart Generation

This feature allows you to generate BPMN workflow diagrams from natural language descriptions. Simply provide a text description of your workflow process, and the AI model will analyze the semantic meaning and generate the corresponding BPMN flowchart automatically. This significantly reduces the time and effort required to create workflow definitions.

2. Image Classification

The image classification feature uses AI models to identify specific category attributes of images. You can configure prompt word information to guide the AI model in analyzing and identifying image classifications. This is particularly useful for workflow routing based on document types (e.g., invoices, contracts, receipts). The processing approach for multimodal files is similar and can be extended to support various file types.

3. RAG-Enhanced Retrieval

This feature integrates vector database technology to provide intelligent knowledge retrieval. The system compares the similarity of knowledge base records according to the vector value of user's search terms, then generates response information from the large language model. This enables more accurate and context-aware responses by leveraging your organization's knowledge base.

📚 Usage Examples

Complete Workflow Example

using Slickflow.Engine.Service;
using Slickflow.Engine.Business.Entity;
using Slickflow.Engine.Common;
using Slickflow.Data;
using Microsoft.Extensions.Configuration;

// 1. Initialize configuration
var configuration = new ConfigurationBuilder()
    .AddJsonFile("appsettings.json")
    .Build();

// 2. Initialize database
var dbType = configuration["ConnectionStrings:WfDBConnectionType"];
var connectionString = configuration["ConnectionStrings:WfDBConnectionString"];
DBTypeExtenstions.InitConnectionString(dbType, connectionString);

// 3. Create workflow service
IWorkflowService workflowService = new WorkflowService();

// 4. Get available processes
var processes = workflowService.GetProcessListSimple();
var process = processes.FirstOrDefault(p => p.ProcessName == "Approval Process");

if (process != null)
{
    // 5. Start workflow instance
    var runner = new WfAppRunner
    {
        AppName = "My Application",
        AppInstanceID = "app-instance-001",
        ProcessID = process.ProcessGUID,
        Version = process.Version,
        UserID = "user001",
        UserName = "John Doe"
    };
    
    var result = workflowService.StartProcess(runner);
    
    if (result.Status == WfExecutedStatus.Success)
    {
        Console.WriteLine($"Workflow started: {result.InstanceID}");
    }
}

Dependency Injection Example

// In Program.cs or Startup.cs
using Slickflow.Engine.Service;
using Slickflow.Data;

var builder = WebApplication.CreateBuilder(args);

// Add services
builder.Services.AddScoped<IWorkflowService, WorkflowService>();

// Initialize database connection
var dbType = builder.Configuration["ConnectionStrings:WfDBConnectionType"];
var connectionString = builder.Configuration["ConnectionStrings:WfDBConnectionString"];
DBTypeExtenstions.InitConnectionString(dbType, connectionString);

var app = builder.Build();

// Use in controller
app.MapGet("/workflows", (IWorkflowService workflowService) =>
{
    return workflowService.GetProcessListSimple();
});

app.Run();

📋 Package Dependencies

This package automatically includes the following dependencies:

  • Slickflow.Dapper - Extended Dapper ORM
  • Slickflow.Data - Data access layer
  • Slickflow.WebUtility - Web utilities
  • Slickflow.Module - Core module
  • Slickflow.Module.Localize - Localization support
  • Slickflow.Module.Form - Form management
  • Slickflow.Module.Resource - Resource management
  • Slickflow.AI - AI integration module

All dependencies are automatically installed when you install Slickflow.Engine.

🔗 Resources

⚠️ Important Notes

Dapper Package Conflict

Do NOT install the official Dapper package alongside Slickflow.Engine. The package includes Slickflow.Dapper which contains a complete Dapper implementation. Installing both will cause namespace conflicts.

Database Requirements

Ensure your database schema is initialized before using workflow operations. Refer to the project documentation for database setup scripts.

Version 3.5.0 Milestone

Version 3.5.0 is a milestone release introducing AI capabilities. It includes:

  • Text-to-BPMN generation
  • Image classification
  • RAG-enhanced retrieval

🤝 Contributing

Contributions are welcome! Please visit the GitHub repository for contribution guidelines.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Version: 3.5.0
Target Framework: .NET 8.0
Last Updated: 2026-01-5

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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

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
3.5.0 131 1/2/2026
2.3.0 231 12/3/2024
1.7.5 1,197 12/5/2019
1.5.0 1,877 3/24/2017

Slickflow.NET 3.5.0 adds AI big model integration, marking an important milestone version. The integration includes three core features:

1. Text-to-BPMN Flowchart Generation
  Uses text descriptions to generate corresponding BPMN flowcharts after semantic search and analysis by the big model.

2. Image Classification
  Uses the big model to identify specific category attributes of images. Configure prompt word information, and the big model analyzes and identifies image classification. The processing process for multimodal files is similar and can be extended.

3. RAG-Enhanced Retrieval
  Integrates vector database, compares the similarity of knowledge base records according to the vector value of user's search terms, and then generates response information from the large model.

Project: https://github.com/besley/slickflow