开源工作流引擎

https://github.com/besley/Slickflow

 https://www.cnblogs.com/slickflow/tag/.net%E5%B7%A5%E4%BD%9C%E6%B5%81/

  • 1) 流程模型定义说明
    流程(Process):
    是企业组织对业务过程的工作流语言描述。一个完整的流程包括开始节点,中间节点和结束节点。

    活动(Activity):
    对每一个工作项节点上的内容定义,也包括网关,事件等节点。

    转移(Transition):
    表示起始节点和到达节点之间的状态转移。

    执行者(Performer):
    每一个节点定义的角色和用户,作为活动的执行主体。

  • 2)流程流转实例数据存储说明

    流程实例(ProcessInstance):
    存储业务过程流转数据,包括流程标识,业务数据标识和流程发起时间,当前状态和结束时间等信息。

    活动实例(ActivityInstance):
    存储每个流程节点的实例信息,包括活动节点的标识,状态,接收人,办理时间,结束时间等信息。

    转移实例(TransitionInstance):
    存储每条转移的状态数据,包括转移表示,起始节点信息,到达节点信息。

    任务实例(Tasks)
    活动接收和办理人的信息列表,待办任务和已办任务的数据来源。

  • 2. 流程服务方法调用图示

                                              图2   流程服务接口调用示意

  • 流程服务常用的6个API接口具体描述

    流程从启动,运行到最终结束时,需要调用引擎服务API接口。

    1) StartProcess()

    启动流程调用此方法,生成流程实例,并置状态到开始节点之后的任务节点。

    2) RunProcessApp()

    流程运行调用此方法,将当前任务结束,并分发任务给下一步节点的办理人。

    3) JumpProcess()

    跳转到指定的任务节点,有预先指定方式,或运行时动态调用方式。

    4) WithdrawProcess()

    当前任务节点的上一步节点完成人发现办理有误需撤销,调用此方法,重新回到上一步节点。

    5) SendbackProcess()

    当前任务办理人退回任务到上一步执行节点。

    6) ReverseProcess()

    流程结束后仍需返回,由结束节点前的执行人调用此方法,状态回到结束前的节点。

  • 官网地址:

        http://www.slickflow.com

  • 网站演示地址:

        http://www.slickflow.com/demo/index

  • Github 地址: 

        https://github.com/besley/Slickflow

  • Codeplex地址:

        http://slickflow.codeplex.com

.NET/.NETCore Workflow Engine With Full Source Code

  1. .NET, .NET CORE version both supported
    Slickflow is an open-source project based on .NET5; It's easy to use engine product into the cross-platform application.
  2. BPMN graphic style process diagram
    Slickflow is using BPMN notation to describe process diagram, the Slickflow designer is HTML5 graph editor and user-friendly to business process communication and business analysis.
  3. High performance with Dapper.NET library
    Dapper is a simple object mapper for .NET and owns the title of King of Micro ORM in terms of speed and is virtually as fast as using a raw ADO.NET data reader. An ORM is an Object Relational Mapper, which is responsible for mapping between database and programming language. (Ref: https://dapper-tutorial.net/dapper)
  4. Multiple databases supported
    Slickflow supports SQLSERVER, ORACLE, MySQL and another database, it implemented by the Dapper.NET extension library. The .net core version using EF core to support different database products.
  5. Workflow patterns supported
    Wokflow Pattern
    1). Sequence
    the most frequently process pattern
    2). Split/Merge
    support and/or gateway such as and/or split, and/or join, together with condition variables on the transition
    3). Sub-process
    in the main process, a subprocess node can start a new process life cycle.
    4). Multi-instance
    multiple performers processing a task together by multiple task instances. All performers both compete for their task, then the process can be continued on. There are sequence and parallel pattern, and the percentage or count parameters can be set on it to ensue when can go to the next step.
    Muliple Instance Pattern
    5). Event interoperation
    process instance and activity instance event delegation service, such as process/activity start, execute and complete.
    6). Timer
    integrated with HangFire library, and with CRON expression supported
    7). Email
    todo or overdue tasks email notification
    8). Withdraw
    withdraw the task after just sent out to next step users.
    9). Sendback
    send back to the previous step user, because of some exceptions.
    10). Resend
    combined after sendback and re-send the task to original sendback users.
    11). Reverse
    reverse the process instance alive when completed.
    12). Jump
    jump the process over by several steps forward or backward.
    13). MessageQueue(RabbitMQ)
    message publishing and subscribing to implement message throwing and catching.

6. Process Version
the process has version property to upgrade a new definition due to the business process changed.
7. XML Cache
the runtime instance use cache to keep the XML process diagram by an expired duration.
8. Sequence Process Code Style
0). Model

//create a simple sequence process diagram by hand code rather than a HTML designer  
var pmb = ProcessModelBuilder.CreateProcess("simple-process-name", "simple-process-code");
var process = pmb.Start("Start")
	.Task("Task1")
	.Task("Task2")
	.End("End")
	.Store();       

simple sequence diagram

1). Start

//start a new process instance
IWorkflowService wfService = new WorkflowService();
var wfResult = wfService.CreateRunner("10", "jack")
            .UseApp("DS-100", "Book-Order", "DS-100-LX")
            .UseProcess("PriceProcessCode")
            .Start();

2). Run

//run a process instance to next step
IWorkflowService wfService = new WorkflowService();
var wfResult = wfService.CreateRunner("10", "jack")
            .UseApp("DS-100", "Book-Order", "DS-100-LX")
            .UseProcess("PriceProcessCode")
            .NextStepInt("20", "Alice")
            .Run();

3). Withdraw

//Withdraw a activity instance to previous step
IWorkflowService wfService = new WorkflowService();
var wfResult = wfService.CreateRunner("10", "Jack")
            .UseApp("DS-100", "Book-Order", "DS-100-LX")
            .UseProcess("PriceProcessCode")
            .OnTask(id)             //TaskID
            .Withdraw();

4). SendBack

//Sendback a activity instance to previous step
IWorkflowService wfService = new WorkflowService();
var wfResult = wfService.CreateRunner("20", "Alice")
            .UseApp("DS-100", "Book-Order", "DS-100-LX")
            .UseProcess("PriceProcessCode")
            .PrevStepInt()
            .OnTask(id)             //TaskID
            .SendBack();

9. Rich demo projects
WebDemo, MvcDemo, and WinformDemo project are demonstrated for a different type of enterprise information systems.
10. Target
Slickflow is very suitable for software teams or companies who want to integrate workflow engine into their products.
11. Suggestions
Slickflow is suggested to give programmers a flexible way to integrate workflow engine components into their products or customer projects. The programmers can write their own code segments based on the engine component.
12. Open Source Project License
The product is under Slickflow Open Source Project license.
1). Slickflow software must be legally used, and should not be used in violation of the law, morality and other acts that endanger social interests;
2). Non-transferable, non-transferable and indivisible authorization of this software;
3). The source code can be modified to apply Slickflow components in their own projects or products, but Slickflow source code can not be separately encapsulated for sale or distributed to third-party users;
4). The intellectual property rights of Slickflow software shall be protected by law, and no documents such as technical data shall be made public or sold.
13. Commercial license
The enterprise, ultimate and universe version can be provided with a commercial license, technical support and upgrade service.

if you have any further inquiry, please feel free to contact us:

Email: sales@ruochisoft.com
QQ(Author): 47743901

Quick Start Tutorial:
https://github.com/besley/Slickflow/wiki/Slickflow-Quick-Start-Tutorial
Wiki Page:
https://github.com/besley/Slickflow/wiki
CodeProject Articles:
https://www.codeproject.com/Articles/5246528/Slickflow-NET-Core-Open-Source-Workflow-Engine https://www.codeproject.com/Articles/5252483/Slickflow-Coding-Graphic-Model-User-Manual
Slickflow website:
http://www.slickflow.net
http://www.slickflow.com
Demo:
http://www.slickflow.com/demo/index
Designer Demo:
http://demo.slickflow.com/sfd/
Modeler Demo:
http://demo.slickflow.com/sfd/model
Document:
http://www.slickflow.com/wiki/index
Quasar Form Builder
The online dynamic form demo:http://demo.slickflow.com/sqd/
The SlickQua project:http://github.com/besley/slickqua/

原文地址:https://www.cnblogs.com/lhxsoft/p/15596651.html