概述

项目地址

https://github.com/danielgerlag/workflow-core


Workflow Core is a light weight workflow engine targeting .NET Standard. Think: long running processes with multiple tasks that need to track state. It supports pluggable persistence and concurrency providers to allow for multi-node clusters.

Workflow Core是一个.NET Standard框架下的轻量级流程引擎。

思考:具有多个需要跟踪状态的任务的长时间运行的流程。它支持可插入的持久性和并发性提供程序,允许多节点集群。

安装

通过NuGet包进行安装

PM> Install-Package WorkflowCore

Fluent API

使用Fluent API 定义流程

public class MyWorkflow : IWorkflow
{
    public void Build(IWorkflowBuilder<MyData> builder)
    {    
        builder
           .StartWith<Task1>()
           .Then<Task2>()
           .Then<Task3>;
    }
}