Msm.Module.Workflow.Infrastructure
1.0.11
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Msm.Module.Workflow.Infrastructure --version 1.0.11
NuGet\Install-Package Msm.Module.Workflow.Infrastructure -Version 1.0.11
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="Msm.Module.Workflow.Infrastructure" Version="1.0.11" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Msm.Module.Workflow.Infrastructure" Version="1.0.11" />
<PackageReference Include="Msm.Module.Workflow.Infrastructure" />
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 Msm.Module.Workflow.Infrastructure --version 1.0.11
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Msm.Module.Workflow.Infrastructure, 1.0.11"
#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 Msm.Module.Workflow.Infrastructure@1.0.11
#: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=Msm.Module.Workflow.Infrastructure&version=1.0.11
#tool nuget:?package=Msm.Module.Workflow.Infrastructure&version=1.0.11
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Msm.Module.Workflow.Application
Application layer cho MSM Workflow Engine - chứa business logic, services, DTOs, và interfaces.
📦 Installation
<PackageReference Include="Msm.Module.Workflow.Application" Version="1.0.0" />
dotnet add package Msm.Module.Workflow.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.Module.Workflow.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.CreateWorkflowProcessFromDtoAsync(dto);
return Ok(process);
}
[HttpPost("trigger")]
public async Task<IActionResult> TriggerWorkflow(Guid workflowProcessId, string objectId)
{
var instance = await _instanceService.SubmitWorkflowInstanceAsync(
workflowProcessId: workflowProcessId,
targetRecordId: objectId,
targetObjectType: "PURCHASE_ORDER",
submittedBy: "user123",
contextData: null
);
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
using Msm.Module.Workflow.Domain.Entities.Workflow;
public class MySmsHandler : IWorkflowActionHandler
{
public string ActionType => "SMS_ALERT";
public Task ExecuteAsync(
WorkflowInstance request,
WorkflowStepAction action,
CancellationToken cancellationToken = default)
{
// Your implementation
return Task.CompletedTask;
}
}
🔗 Dependencies
Msm.Module.Workflow.Domain(required)Msm.Module.Workflow.Infrastructure(required)Microsoft.Extensions.Hosting.Abstractions(10.0.1)
📚 Related Packages
Msm.Module.Workflow.Domain- Required dependencyMsm.Module.Workflow.Infrastructure- Required dependencyMsm.Module.Workflow.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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- AutoMapper (>= 16.1.1)
- FluentValidation (>= 11.11.0)
- FluentValidation.DependencyInjectionExtensions (>= 11.11.0)
- MailKit (>= 4.16.0)
- MediatR (>= 12.4.1)
- Microsoft.EntityFrameworkCore (>= 8.0.11)
- Microsoft.Extensions.Configuration (>= 9.0.0)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.0)
- Microsoft.Extensions.Configuration.Json (>= 8.0.1)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.1)
- Microsoft.Extensions.Http (>= 8.0.1)
- Msm.Core.Abstractions (>= 1.0.11)
- Msm.Module.Workflow (>= 1.0.11)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 8.0.11)
-
net8.0
- AutoMapper (>= 16.1.1)
- FluentValidation (>= 11.11.0)
- FluentValidation.DependencyInjectionExtensions (>= 11.11.0)
- MailKit (>= 4.16.0)
- MediatR (>= 12.4.1)
- Microsoft.EntityFrameworkCore (>= 8.0.11)
- Microsoft.Extensions.Configuration (>= 9.0.0)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 9.0.0)
- Microsoft.Extensions.Configuration.Json (>= 8.0.1)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.1)
- Microsoft.Extensions.Http (>= 8.0.1)
- Msm.Core.Abstractions (>= 1.0.11)
- Msm.Module.Workflow (>= 1.0.11)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 8.0.11)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Msm.Module.Workflow.Infrastructure:
| Package | Downloads |
|---|---|
|
Msm.Module.Workflow.AspNetCore
ASP.NET Core controllers and HTTP surface for the MSM workflow module. |
GitHub repositories
This package is not used by any popular GitHub repositories.