Msm.Workflow.Lib.Application
1.4.0
See the version list below for details.
dotnet add package Msm.Workflow.Lib.Application --version 1.4.0
NuGet\Install-Package Msm.Workflow.Lib.Application -Version 1.4.0
<PackageReference Include="Msm.Workflow.Lib.Application" Version="1.4.0" />
<PackageVersion Include="Msm.Workflow.Lib.Application" Version="1.4.0" />
<PackageReference Include="Msm.Workflow.Lib.Application" />
paket add Msm.Workflow.Lib.Application --version 1.4.0
#r "nuget: Msm.Workflow.Lib.Application, 1.4.0"
#:package Msm.Workflow.Lib.Application@1.4.0
#addin nuget:?package=Msm.Workflow.Lib.Application&version=1.4.0
#tool nuget:?package=Msm.Workflow.Lib.Application&version=1.4.0
Msm.Workflow.Lib.Application
Application layer cho MSM Workflow Engine - chứa business logic, services, DTOs, và interfaces.
📦 Installation
<PackageReference Include="Msm.Workflow.Lib.Application" Version="1.0.0" />
dotnet add package Msm.Workflow.Lib.Application
📋 Overview
Package này chứa business logic layer của workflow engine. Bao gồm services, DTOs, và các interfaces để customize workflow behavior.
Contents
- Services:
WorkflowProcessService- Quản lý workflow processesWorkflowInstanceService- Quản lý workflow instances và executionTenantService- Quản lý multi-tenancy
- DTOs: Data Transfer Objects cho API
- Interfaces:
IUserProvider- Customize user resolutionIApproverResolver- Customize approver resolutionICriteriaEvaluator- Customize criteria evaluationIWorkflowActionHandler- Customize action handlers
🎯 Usage
Register Services
using Msm.Workflow.Lib.Application;
// In Program.cs or Startup.cs
services.AddApplication();
Configure Custom Providers
services.AddApplication()
.ConfigureWorkflow(options =>
{
// Customize UserProvider
options.UseUserProvider<MyUserProvider>();
// Customize ApproverResolver
options.UseApproverResolver<MyApproverResolver>();
// Customize CriteriaEvaluator
options.UseCriteriaEvaluator<MyCriteriaEvaluator>();
});
Use Services
public class MyController : ControllerBase
{
private readonly IWorkflowProcessService _processService;
private readonly IWorkflowInstanceService _instanceService;
public MyController(
IWorkflowProcessService processService,
IWorkflowInstanceService instanceService)
{
_processService = processService;
_instanceService = instanceService;
}
[HttpPost("create-process")]
public async Task<IActionResult> CreateProcess(CreateWorkflowProcessDto dto)
{
var process = await _processService.CreateProcessAsync(dto);
return Ok(process);
}
[HttpPost("trigger")]
public async Task<IActionResult> TriggerWorkflow(string processCode, string objectId)
{
var instance = await _instanceService.CreateInstanceAsync(
processCode: processCode,
objectId: objectId,
objectType: "PURCHASE_ORDER",
submitterId: "user123"
);
return Ok(instance);
}
}
Implement Custom Interfaces
// Custom UserProvider
public class MyUserProvider : IUserProvider
{
public Task<UserInfo?> GetUserAsync(string userId, CancellationToken cancellationToken = default)
{
// Your implementation
}
// ... other methods
}
// Custom Action Handler
public class MySmsHandler : IWorkflowActionHandler
{
public string ActionType => "SMS_ALERT";
public Task ExecuteAsync(WorkflowAction action, CancellationToken cancellationToken = default)
{
// Your implementation
}
}
🔗 Dependencies
Msm.Workflow.Lib.Domain(required)Msm.Workflow.Lib.Infrastructure(required)Microsoft.Extensions.Hosting.Abstractions(10.0.1)
📚 Related Packages
Msm.Workflow.Lib.Domain- Required dependencyMsm.Workflow.Lib.Infrastructure- Required dependencyMsm.Workflow.Lib.Api.Controllers- Uses this package
📖 Documentation
For more information, see the main README.md and GETTING_STARTED.md.
| 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 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. |
-
net10.0
- AutoMapper (>= 13.0.1)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.1)
- Msm.Workflow.Lib.Domain (>= 1.4.0)
- Msm.Workflow.Lib.Infrastructure (>= 1.4.0)
-
net8.0
- AutoMapper (>= 13.0.1)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.1)
- Msm.Workflow.Lib.Domain (>= 1.4.0)
- Msm.Workflow.Lib.Infrastructure (>= 1.4.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Msm.Workflow.Lib.Application:
| Package | Downloads |
|---|---|
|
Msm.Workflow.Lib.Infrastructure
Infrastructure layer for MSM Workflow Engine including Entity Framework Core DbContext, configurations, and database access. Requires Msm.Workflow.Lib.Domain. |
|
|
Msm.Workflow.Lib.Api.Controllers
Pre-built API controllers for MSM Workflow Engine. Includes CRUD endpoints for workflow processes, instances, and tasks. Can be used directly or inherited for customization. Requires Msm.Workflow.Lib.Application. |
GitHub repositories
This package is not used by any popular GitHub repositories.