XiHan.Framework.Workflow.Abstractions 5.0.0-preview.2

Prefix Reserved
This is a prerelease version of XiHan.Framework.Workflow.Abstractions.
dotnet add package XiHan.Framework.Workflow.Abstractions --version 5.0.0-preview.2
                    
NuGet\Install-Package XiHan.Framework.Workflow.Abstractions -Version 5.0.0-preview.2
                    
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="XiHan.Framework.Workflow.Abstractions" Version="5.0.0-preview.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XiHan.Framework.Workflow.Abstractions" Version="5.0.0-preview.2" />
                    
Directory.Packages.props
<PackageReference Include="XiHan.Framework.Workflow.Abstractions" />
                    
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 XiHan.Framework.Workflow.Abstractions --version 5.0.0-preview.2
                    
#r "nuget: XiHan.Framework.Workflow.Abstractions, 5.0.0-preview.2"
                    
#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 XiHan.Framework.Workflow.Abstractions@5.0.0-preview.2
                    
#: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=XiHan.Framework.Workflow.Abstractions&version=5.0.0-preview.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=XiHan.Framework.Workflow.Abstractions&version=5.0.0-preview.2&prerelease
                    
Install as a Cake Tool

XiHan.Framework.Workflow.Abstractions

关于

XiHan.Framework.Workflow.Abstractions 定义工作流的契约并包含工作流引擎:流程定义与校验、定义目录、内置活动、实例与书签、用户任务与外部任务、表达式语言,以及到期书签的轮询器。它不包含存储的实现,单独引用不能运行流程。

主要特性

  • 流式构造流程定义:用户任务、决策、并行与汇合、延时、信号、子流程、HTTP 调用等
  • 流程实例随业务事务提交或回滚,数据按平台与租户分区隔离
  • 用户任务支持会签、转办、加签、认领与催办
  • 存储、事务与实例锁是窄契约,由提供程序实现

如何使用

安装

dotnet add package XiHan.Framework.Workflow.Abstractions --prerelease

使用

一般由实现包带入,定义流程或写自定义活动与存储提供程序时才直接引用;运行流程需要同时装配 Workflow.InMemory 或 Workflow.Database。登记自定义活动,并定义、发布、启动流程:

builder.Services.AddActivity<AuditActivity>("Audit");

var definition = WorkflowDefinitionBuilder.Create("demo.greeting")
    .AddVariable("name", required: true)
    .AddStart()
    .AddNode("greet", ActivityTypes.SetVariable, configure: node => node
        .WithProperty(SetVariableActivity.ExpressionsProperty, new JsonObject { ["greeting"] = "'hello ' + upper(name)" }))
    .AddEnd()
    .AddTransition("start", "greet").AddTransition("greet", "end")
    .Build();
var draft = (await catalog.CreateAsync(definition, ct)).ValueOrThrow();
await catalog.PublishAsync(draft.Id, ct);
var instance = await engine.StartAsync(new WorkflowStartRequest { Name = "demo.greeting", Variables = new JsonObject { ["name"] = "alice" } }, ct);

主要类型

此库提供的主要类型:

  • WorkflowDefinitionBuilder:流式构造流程定义
  • IWorkflowDefinitionCatalog:定义的创建、发布、停用与查询
  • IWorkflowEngine:启动实例、发信号、挂起、恢复、取消与查询
  • IWorkflowTaskService、IWorkflowExternalTaskService:用户任务与外部任务
  • IActivity、IAssigneeProvider:自定义活动与指派规则
  • WorkflowOptions:XiHan:Workflow 配置项

更多文档

相关包

反馈与贡献

XiHan.Framework.Workflow.Abstractions 以 MIT 许可证 开源。欢迎到 GitHub 仓库 提交问题和贡献。

Product Compatible and additional computed target framework versions.
.NET 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 (5)

Showing the top 5 NuGet packages that depend on XiHan.Framework.Workflow.Abstractions:

Package Downloads
XiHan.Framework.Workflow

曦寒框架工作流库(图执行引擎、标准活动库、审批任务、表达式求值、定时器调度、内存存储默认实现)

XiHan.Framework.Workflow.InMemory

曦寒框架工作流的内存默认实现

XiHan.Framework.Profiles.Full

曦寒框架 Full 组合包

XiHan.Framework.Workflow.Conformance

曦寒框架工作流一致性测试套件

XiHan.Framework.Workflow.Database

曦寒框架工作流的数据库提供程序

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.0-preview.2 0 11/6/2026
5.0.0-preview.1 40 11/4/2026
4.8.0 163 10/22/2026
4.7.1 110 10/21/2026
4.7.0 136 10/15/2026
4.6.2 98 10/13/2026
4.6.1 274 10/3/2026
4.6.0 130 9/25/2026
4.5.0 118 9/23/2026
4.4.0 127 9/22/2026
4.3.0 143 9/12/2026
4.2.0 175 9/4/2026
4.1.0 147 8/31/2026
4.0.0 142 8/28/2026
3.14.0 137 8/26/2026
3.13.0 179 8/15/2026
3.12.1 143 8/14/2026
3.12.0 398 8/13/2026
3.11.1 133 8/11/2026
3.11.0 365 8/11/2026
Loading failed