Msm.Workflow.Lib.Application 1.4.0

There is a newer version of this package available.
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
                    
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.Workflow.Lib.Application" Version="1.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Msm.Workflow.Lib.Application" Version="1.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Msm.Workflow.Lib.Application" />
                    
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 Msm.Workflow.Lib.Application --version 1.4.0
                    
#r "nuget: Msm.Workflow.Lib.Application, 1.4.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 Msm.Workflow.Lib.Application@1.4.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=Msm.Workflow.Lib.Application&version=1.4.0
                    
Install as a Cake Addin
#tool nuget:?package=Msm.Workflow.Lib.Application&version=1.4.0
                    
Install as a Cake Tool

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 processes
    • WorkflowInstanceService - Quản lý workflow instances và execution
    • TenantService - Quản lý multi-tenancy
  • DTOs: Data Transfer Objects cho API
  • Interfaces:
    • IUserProvider - Customize user resolution
    • IApproverResolver - Customize approver resolution
    • ICriteriaEvaluator - Customize criteria evaluation
    • IWorkflowActionHandler - 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)
  • Msm.Workflow.Lib.Domain - Required dependency
  • Msm.Workflow.Lib.Infrastructure - Required dependency
  • Msm.Workflow.Lib.Api.Controllers - Uses this package

📖 Documentation

For more information, see the main README.md and GETTING_STARTED.md.

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 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.

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.

Version Downloads Last Updated
1.9.0 64 3/5/2026
1.8.0 119 3/2/2026
1.6.0 122 1/11/2026
1.5.0 116 1/11/2026
1.4.0 110 1/11/2026
1.3.0 112 1/9/2026
1.2.0 112 1/7/2026
1.1.0 111 1/6/2026
1.0.0 104 1/6/2026