GoWindGoWind
Home
Framework
GoWind Toolkit
  • Open Source

    • GoWind Admin (Admin Platform)
    • GoWind CMS (Content Management)
    • GoWind UBA (Behavior Analytics)
    • GoWind Shop (E-commerce)
    • GoWind Kanban (Kanban Boards)
    • GoWind Ledger (Personal Finance)
    • GoWind ShortPlay (Short Drama)
    • GoWind Ops (Operations Platform)
    • RushWind (Rust Ecosystem)
  • Open Core (Community + Enterprise)

    • GoWind OA (Office Collaboration)
    • GoWind ERP (Procure-to-Pay)
    • GoWind WMS (Warehousing)
  • Commercial

    • GoWind IM (Instant Messaging)
    • GoWind IoT (IoT Platform)
    • GoWind Edu (AI Education)
    • GoWind MES (Manufacturing Execution)
    • GoWind CDC (Data Pipeline)
    • GoWind SDP (Zero-Trust Gateway)
    • GoWind Quant (Quant Research)
    • GoWind Trade Radar (Export Sourcing)
    • GoWind Game Radar (Game Greenlight)
  • 简体中文
  • English
GitHub
Home
Framework
GoWind Toolkit
  • Open Source

    • GoWind Admin (Admin Platform)
    • GoWind CMS (Content Management)
    • GoWind UBA (Behavior Analytics)
    • GoWind Shop (E-commerce)
    • GoWind Kanban (Kanban Boards)
    • GoWind Ledger (Personal Finance)
    • GoWind ShortPlay (Short Drama)
    • GoWind Ops (Operations Platform)
    • RushWind (Rust Ecosystem)
  • Open Core (Community + Enterprise)

    • GoWind OA (Office Collaboration)
    • GoWind ERP (Procure-to-Pay)
    • GoWind WMS (Warehousing)
  • Commercial

    • GoWind IM (Instant Messaging)
    • GoWind IoT (IoT Platform)
    • GoWind Edu (AI Education)
    • GoWind MES (Manufacturing Execution)
    • GoWind CDC (Data Pipeline)
    • GoWind SDP (Zero-Trust Gateway)
    • GoWind Quant (Quant Research)
    • GoWind Trade Radar (Export Sourcing)
    • GoWind Game Radar (Game Greenlight)
  • 简体中文
  • English
GitHub
  • Introduction

    • GoWind Framework
    • Framework Architecture
  • go-wind Core

    • go-wind Core Framework
    • App Lifecycle Management
    • Context Propagation
    • Transport Abstraction
    • Log Facade Interface
  • go-wind-plugins

    • go-wind-plugins Plugin Overview
    • Plugin Configuration System
    • Plugin Registration Mechanism (SPI)
    • Logging Adapter Plugins
    • Transport Protocol Plugins
    • Message Middleware Plugins
    • Encoding Plugins
    • Security and Authentication Plugins
    • Distributed Tracing Plugins
    • Cache Plugins
    • Object Storage Plugins (OSS)
    • Rate Limiting Plugins
    • Metrics Plugins
    • AI Plugins
    • Workflow Plugins
    • Database and Cache Plugins
    • Bootstrap Integration and Gateway Plugins
    • Compression and Serialization Plugins
    • Template Rendering and Validation Plugins
  • go-wind-bootstrap

    • go-wind-bootstrap: The Declarative Bootstrap
    • The Bootstrap Configuration System
    • The Bootstrap SPI Mechanism
    • Declarative Middleware Orchestration
    • Bootstrap Command-Line Integration
    • Bootstrap Practical Examples
  • go-wind-flow Workflow Engine

    • GoWind Flow Process Engine
  • Tutorials

    • Quick Start Tutorial
    • Custom Plugin Development Tutorial
    • Multi-Protocol Listening Tutorial
    • Framework Migration Guide

GoWind Flow Process Engine

GoWind Flow (Chuan Liu) is the lightweight workflow engine of the go-wind family: BPMN 2.0 compatible, a persistent Token state machine, a zero-dependency core, and pluggable script engines. It aligns with the commonly used subset of Flowable / Camunda / Activiti and, as a pure Go library, embeds mature process orchestration capabilities into any service. The project is open source under the MIT license; the current version is v0.2.0.

Design philosophy: the engine manages process flow; scripts manage everything beyond the flow.

  • BPMN 2.0 compatible subset — aligned with the commonly used subset of Flowable / Camunda / Activiti; the repository provides a full compatibility matrix (docs/bpmn_compat)
  • Persistent Token state machine — process instance state is persisted as Tokens, so execution can continue after a service restart
  • Zero-dependency core — the core introduces no third-party dependencies; storage and script engines are both pluggable and replaceable
  • Pluggable script engines — business logic lives in scripts, integrated with the 9 script engines of go-scripts through contrib

1. Origin and Current Status

GoWind Flow was extracted and generalized from the approval flow engines of go-wind-oa / go-wind-im, distilling the approval workflow capabilities repeatedly refined in those two business products into an independent engine.

Note the distinction from the workflow engine adapters in go-wind-plugins (Temporal / Argo / Conductor / GoWorkflows): those are adapter plugins for third-party engines, while flow is the family's own lightweight engine.

The relationship with the host products, stated as it is:

  • Migration is still being planned — the plan is to migrate OA / IM to flow in four phases using the "strangler-fig pattern"; see docs/oa_im_migration in the repository for the migration roadmap
  • No host product references it yet — OA / IM still use their respective built-in approval engines; flow has not yet been adopted by any product

Version trajectory: the project debuted with v0.1.0 (M0 core skeleton) on 2026-10-30; the current version is v0.2.0, in a period of rapid iteration.

2. Quick Start

Use it as an embedded Go library — after go get, three steps complete a full flow execution:

go get github.com/tx7do/go-wind-flow

2.1 The Three-Step Usage

  1. Create the engine — flow.New(WithStore(...), WithImporters(bpmn.Importer{})): choose the storage implementation and register the BPMN importer
  2. Deploy the process definition — Deploy deploys a BPMN process definition; definitions are immutable and automatically versioned
  3. Start and drive — Start starts a process instance; CompleteTask completes tasks to advance the flow

2.2 Example Code (Illustrative)

package main

// Illustrative: consult the repository README for the exact import paths and option signatures
import "github.com/tx7do/go-wind-flow"

func main() {
    // ① Create the engine: choose a storage implementation (ent / gorm / memory) and register the BPMN importer
    engine := flow.New(
        WithStore(/* ... */),
        WithImporters(bpmn.Importer{}),
    )

    // ② Deploy the process definition (immutable, automatically versioned)
    engine.Deploy(ctx, leaveApproval)

    // ③ Start a process instance / complete tasks
    instance, _ := engine.Start(ctx, "leave-approval", variables)
    _ = engine.CompleteTask(ctx, taskID, taskVars)
}

The above is illustrative code for the three-step usage; for complete runnable examples, see the repository's examples/ and README.

3. Architecture Components

ModuleDescription
api/Pure gRPC contracts, published to buf.build (BSR); clients can reference them remotely
server/gRPC service implementation exposing the engine's capabilities as a service
store/Three storage implementations: ent / gorm / memory
contrib/goscriptsIntegration with the 9 script engines of go-scripts
frontend/npm workspace: @go-wind/flow-designer-core / -vue / -react (v0.2.0), bpmn-js wrapper + approval configuration panel + DingTalk-style vertical approval tree

The engine can either be called directly as an embedded library or deployed independently as a gRPC service via server/, depending on your architectural preference.

4. Capabilities

CapabilityDescription
Countersigning / any-approveMulti-approver nodes: flow proceeds when everyone approves, or when any one approves
Candidate group tasksTasks are assigned to candidate groups; members within the group claim and handle them
Error eventsCatch process errors and branch into exception handling
Collection multi-instanceGenerate multi-instance tasks item by item from a collection
Boundary timer eventsTimer boundary events attached to nodes
Intermediate message eventsIntermediate process nodes wait for / receive messages
Auto-approve / reject on timeoutTasks are approved or rejected automatically after timeout
Timer scheduling reference implementationexamples/scheduler
Example processesleave-approval.bpmn.xml, timer-approval.bpmn.xml

Version status: iterating rapidly after v0.2.0; some capabilities remain in an Unreleased state — refer to the repository CHANGELOG.

5. Performance Baseline

The following are benchmark figures from the repository:

ScenarioDuration
Linear-flow approval~104µs
Linear-flow approval (ent + sqlite storage)~1.1ms

Actual performance depends on the storage medium and process complexity; we recommend benchmarking against your own business processes.

6. Repository and Documentation

  • Repository: tx7do/go-wind-flow (MIT)
  • The tutorial section is under construction; for now, refer to the repository's topical documents:
Topic DocumentContent
docs/architecture_designArchitecture design
docs/bpmn_compatBPMN 2.0 compatibility matrix
docs/designer_contractDesigner contract
docs/oa_im_migrationOA / IM migration roadmap
docs/roadmapRoadmap

Related Documentation

  • GoWind Framework Overview
Edit this page
Last Updated:: 11/3/26, 2:14 PM
Contributors: Bobo