FlowLong (飞龙) Workflow Engine

repository·main·Indexed 21 days ago

https://github.com/aizuda/flowlong

A sophisticated workflow engine built on MybatisPlus for complex business processes. It features advanced signing logic (weighted, parallel, sequential), branching (conditional, parallel, inclusive, routing), and AI-assisted decision-making. The engine supports comprehensive task management operations including transfer, delegation, proxy, recall, and dynamic signing, as well as granular rejection and re-approval strategies.

Tokens
1.1K
Snippets
0
Records
4
Agent score
24%

What's inside FlowLong

  1. Overview of FlowLong (飞龙) Workflow

    main

    FlowLong (飞龙) is a workflow engine designed with a focus on advanced process control features. It is built using MybatisPlus for the ORM layer and draws design inspiration from established workflow engines like Activiti, Flowable, Camunda, and SnakerFlow.

    Key Resources:

  2. Licensing and Usage Terms

    main

    FlowLong uses a Dual-Protocol License model:

    1. Apache-2.0: The default open-source license. Commercial use is permitted for any purpose provided you comply with the Additional Protocol.
    2. Additional Protocol Requirements:
      • You must prominently display copyright information (including a link to the repository) in your project description.
      • You are not allowed to remove source code comment declarations.
      • You are not allowed to create 'clones' or 'skins' that compete with the official Enterprise Edition (this includes re-open-sourcing).
      • Violation of these terms results in an automatic upgrade to the AGPL-3.0 license and may lead to legal claims (up to 1 million).
    3. Prohibition: Use of the project for illegal purposes is strictly prohibited.
  3. FlowLong Workflow Control Concepts

    main

    FlowLong supports a wide array of advanced workflow control mechanisms, categorized by branching, approval logic, and task management:

    Branching & Routing

    • Conditional Branch (条件分支): Exclusive branches used for decision-making or error handling.
    • Parallel Branch (并行分支): Uses fork to split into multiple branches and join to merge them.
    • Inclusive Branch (包容分支): A combination of exclusive and parallel branches; allows multiple branches to execute based on conditions, with an optional default branch.
    • Routing Branch (路由分支): Redirects to a specific configured node based on conditions or continues to the default path.
    • Parent-Child Process (父子流程): A main process node can trigger a sub-process (supports synchronous and asynchronous execution).
    • Dynamic Construction (动态构建): Dynamically builds new tasks based on the current task without appearing in the visual flowchart.

    Approval & Signing Logic

    • Sequential Signing (顺序会签): Multiple approvers (e.g., A, B, C) receive tasks in a specific order.
    • Parallel Signing (并行会签): Multiple approvers receive tasks simultaneously; all must agree to proceed.
    • OR Signing (或签): Any one of multiple handlers can process the task to move to the next node.
    • Weighted Signing (票签): Approvers have defined weights; the node proceeds once the total weight exceeds a threshold (e.g., > 50%).
    • AI Approval (AI 审批): Uses AI agents to intelligently route decisions or assist in the approval process.

    Task Management & Operations

    • Transfer (转办): User A transfers a task to User B.
    • Delegation (委派): User A transfers a task to User B, but after B finishes, it returns to A for final approval.
    • Proxy (代理): User A designates User B as a proxy. Both can see/complete the task, but once A completes it, B can no longer see it.
    • Recall (拿回): Allows the previous node's submitter to take back a document before the current handler processes it.
    • Revoke (撤销): The initiator can cancel the process instance.
    • Add/Reduce Signing (加签/减签): Dynamically adding or removing approvers from the current node.
    • Claim (认领): Public tasks can be claimed by users.
    • Reminder (自动提醒): Automatic notifications (SMS, Email, WeChat, DingTalk, etc.) based on set intervals.
    • Time Travel (穿越时空): Allows specifying a past date for an approval to handle retrospective leave requests or similar scenarios.
  4. Configure Rejection and Re-approval Strategies

    main

    FlowLong provides granular control over how rejected tasks are handled via Rejection Strategies (驳回策略) and Re-approval Execution (重新审批执行).

    Rejection Strategies

    When a task is rejected, you can choose to return it to:

    1. Previous Step (上一步)
    2. Initiator (发起人)
    3. Any Node (任意节点)

    Re-approval Execution

    After a rejection is corrected, you can define how the process resumes:

    1. Continue Execution (继续执行)
    2. Return to Rejection Node (退回驳回节点)