Slickflow.Engine
3.5.0
dotnet add package Slickflow.Engine --version 3.5.0
NuGet\Install-Package Slickflow.Engine -Version 3.5.0
<PackageReference Include="Slickflow.Engine" Version="3.5.0" />
<PackageVersion Include="Slickflow.Engine" Version="3.5.0" />
<PackageReference Include="Slickflow.Engine" />
paket add Slickflow.Engine --version 3.5.0
#r "nuget: Slickflow.Engine, 3.5.0"
#:package Slickflow.Engine@3.5.0
#addin nuget:?package=Slickflow.Engine&version=3.5.0
#tool nuget:?package=Slickflow.Engine&version=3.5.0
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 ServerMYSQL- MySQL DatabasePGSQL- PostgreSQL DatabaseORACLE- 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 definitionsStartProcess(WfAppRunner)- Start a new workflow instanceRunProcess(WfAppRunner)- Execute workflow step (recommended)RunProcessApp(WfAppRunner)- Execute workflow step (obsolete, useRunProcessinstead)GetRunningTasks(TaskQuery)- Get running tasks for a userGetReadyTasks(TaskQuery)- Get ready (pending) tasks for a userGetCompletedTasks(TaskQuery)- Get completed tasks for a userGetProcessInstance(int processInstanceId)- Get process instance by process instance IDGetProcessInstance(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 ORMSlickflow.Data- Data access layerSlickflow.WebUtility- Web utilitiesSlickflow.Module- Core moduleSlickflow.Module.Localize- Localization supportSlickflow.Module.Form- Form managementSlickflow.Module.Resource- Resource managementSlickflow.AI- AI integration module
All dependencies are automatically installed when you install Slickflow.Engine.
🔗 Resources
- Project Homepage: https://github.com/besley/slickflow
- Documentation: See project repository for detailed documentation
- Issues: Report issues on GitHub
- License: MIT License
⚠️ 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 | Versions 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. |
-
net8.0
- Devart.Data.Oracle.EFCore (>= 10.3.21.8)
- IronPython (>= 3.4.1)
- Microsoft.Extensions.Caching.Memory (>= 9.0.3)
- Newtonsoft.Json (>= 13.0.3)
- Pomelo.EntityFrameworkCore.MySql (>= 8.0.2)
- Slickflow.AI (>= 3.5.0)
- Slickflow.Data (>= 3.5.0)
- Slickflow.Module (>= 3.5.0)
- Slickflow.Module.Form (>= 3.5.0)
- Slickflow.Module.Localize (>= 3.5.0)
- Slickflow.Module.Resource (>= 3.5.0)
- Slickflow.WebUtility (>= 3.5.0)
- System.Configuration.ConfigurationManager (>= 9.0.2)
- System.Reflection.Emit (>= 4.7.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
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