랭킹으로 돌아가기

alibaba/compileflow

Java

🎨 core business process engine of Alibaba Halo platform, best process engine for trade scenes. | 一个高性能流程编排引擎

flowcompilebpmn2javaalibabaprocessspringprocess-enginehalo-platform
스타 성장
스타
2k
포크
281
주간 성장
이슈
12
5001k1.5k
2020년 7월2022년 7월2024년 7월2026년 7월
아티팩트Mavengit clone https://github.com/alibaba/compileflow.git
README
CompileFlow

CompileFlow

🚀 A High-Performance, Compile-Then-Execute Process Engine

Transforming business processes into optimized Java code for ultimate performance

Github Workflow Build Status Maven Central Java support License

GitHub Stars GitHub Forks

🇨🇳 中文文档

✨ What is CompileFlow?

CompileFlow is a lightweight, high-performance, integrable, and extensible process engine.

Focused on pure in-memory, stateless execution, the CompileFlow Process Engine is one of Taobao's original TBBPM workflow engines. It achieves exceptional efficiency by converting process files into Java code, which is then compiled and executed. It currently powers several core systems at Alibaba, including the Business Mid-end Platform and Trading systems.

CompileFlow allows developers to visually design business logic, bridging the gap between business analysts and engineers and making business expression more intuitive and efficient.

🎯 Key Highlights

  • ⚡ Ultra-High Performance - A compile-then-execute architecture delivers native Java performance.
  • 🔒 Type-Safe - Strong typing with compile-time validation reduces runtime errors.
  • 🔧 Production-Ready - Seamless Spring Boot integration, monitoring, and enterprise features.
  • 📊 Multi-Standard - Supports both BPMN 2.0 and the TBBPM specification.
  • 🎨 Visual Design - An IntelliJ IDEA plugin is available for visual process modeling.

🚀 Quick Start

Get CompileFlow up and running in under 2 minutes.

This is the easiest and most recommended way to use CompileFlow in most applications.

1️⃣ Add Dependency

<dependency>
    <groupId>com.alibaba.compileflow</groupId>
    <artifactId>compileflow-spring-boot-starter</artifactId>
    <version>2.0.0-SNAPSHOT</version>
</dependency>

2️⃣ Inject and Execute

The ProcessEngine is auto-configured as a singleton and can be injected directly.

@Service
public class BusinessService {

    @Autowired
    private ProcessEngine<TbbpmModel> processEngine;

    public MyResponse executeProcess(MyRequest request) {
        ProcessSource processSource = ProcessSource.fromCode("my.business.process");

        ProcessResult<MyResponse> result = processEngine.execute(
            processSource,
            request,
            MyResponse.class
        );

        return result.orElseThrow(() -> new RuntimeException(result.getErrorMessage()));
    }
}

B) Standalone Usage (Non-Spring)

For non-Spring applications, the recommended approach is to implement a manual singleton.

1️⃣ Add Dependencies

<dependency>
    <groupId>com.alibaba.compileflow</groupId>
    <artifactId>compileflow-core</artifactId>
    <version>2.0.0-SNAPSHOT</version>
</dependency>
<!-- Add compileflow-tbbpm or compileflow-bpmn based on your process specification -->
<dependency>
    <groupId>com.alibaba.compileflow</groupId>
    <artifactId>compileflow-tbbpm</artifactId>
    <version>2.0.0-SNAPSHOT</version>
</dependency>

2️⃣ Create a Singleton Engine and Execute

// ProcessEngineHolder.java
public final class ProcessEngineHolder {
    private static final ProcessEngine<TbbpmModel> INSTANCE = ProcessEngineFactory.createTbbpm();

    private ProcessEngineHolder() {}

    public static ProcessEngine<TbbpmModel> getInstance() {
        return INSTANCE;
    }

    // Call this from your application's shutdown hook
    public static void shutdown() {
        if (INSTANCE != null) {
            INSTANCE.close();
        }
    }
}

// YourApplication.java
public class YourApplication {
    public static void main(String[] args) {
        // At application startup, you can warm-up processes
        ProcessEngineHolder.getInstance().admin().deploy(ProcessSource.fromCode("..."));

        // In your business logic, get the singleton instance
        ProcessEngine<TbbpmModel> engine = ProcessEngineHolder.getInstance();
        engine.execute(...);

        // Register a shutdown hook to ensure resources are released
        Runtime.getRuntime().addShutdownHook(new Thread(ProcessEngineHolder::shutdown));
    }
}

⚠️ Important: For long-running applications (like web services), you must use a singleton. Creating a new engine per request will cause severe performance problems. See the Resource Management guide for more details.


📚 Detailed Documentation

Document Description
🚀 Quick Start Guide A complete, runnable example in 5 minutes
⚠️ Resource Management Must Read! How to use the engine singleton correctly to avoid resource leaks
⚙️ Configuration Guide All available YAML and programmatic configuration options
API Reference Detailed reference for all public APIs
🔥 Hot Deployment Zero-downtime process update strategies for production
📊 Monitoring & Observability Integrating with events, metrics, and Prometheus
✨ Advanced Features Engine warm-up, custom ClassLoaders, and more
🔧 Extension Guide Develop custom extensions via SPI
📋 Node Support List TBBPM & BPMN 2.0 supported node details
🛠️ Contributing Guide How to contribute code and documentation to the project

🤝 Community


📜 License

CompileFlow is licensed under the Apache License 2.0

🎆 Star History

Star History Chart

⭐ If CompileFlow helps you, please give us a star! ⭐

관련 저장소
prettier/prettier

Prettier is an opinionated code formatter.

JavaScriptnpmMIT Licenseformatterprinter
prettier.io
52.1k4.9k
ReactiveX/RxJava

RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.

JavaMavenApache License 2.0javarxjava
dsc.gg/rxjava
48.2k7.6k
svc-develop-team/so-vits-svc

SoftVC VITS Singing Voice Conversion

PythonPyPIGNU Affero General Public License v3.0aiaudio-analysis
28.1k5k
verekia/js-stack-from-scratch

🛠️⚡ Step-by-step tutorial to build a modern JavaScript stack.

JavaScriptnpmMIT Licensetutorialstack
20.2k2k
javascript-obfuscator/javascript-obfuscator

A powerful obfuscator for JavaScript and Node.js

TypeScriptnpmBSD 2-Clause "Simplified" Licensejavascript-obfuscatorobfuscation
obfuscator.io
16.2k1.7k
piotrwitek/react-redux-typescript-guide

The complete guide to static typing in "React & Redux" apps using TypeScript

TypeScriptnpmMIT Licensereactredux
piotrwitek.github.io/react-redux-typescript-guide/
13.3k1.1k
didi/LogicFlow

A flow chart editing framework focus on business customization. 专注于业务自定义的流程图编辑框架,支持实现脑图、ER图、UML、工作流等各种图编辑场景。

TypeScriptnpmApache License 2.0flowchartgraph
logicflow.cn
11.5k1.4k
ritz078/transform

A polyglot web converter.

TypeScriptnpmMIT Licensetransformationstypescript
transform.tools
9.2k707
bytedance/flowgram.ai

FlowGram is an extensible workflow development framework with built-in canvas, form, variable, and materials that helps developers build AI workflow platforms faster and simpler.

TypeScriptnpmMIT Licenseflowflowchart
flowgram.ai
8.2k743
Bogdan-Lyashenko/Under-the-hood-ReactJS

Entire React code base explanation by visual block schemes (Stack version)

JavaScriptnpmMIT Licensereactjsjavascript
bogdan-lyashenko.github.io/Under-the-hood-ReactJS/
6.8k614
bcakmakoglu/vue-flow

A highly customizable Flowchart component for Vue 3. Features seamless zoom & pan 🔎, additional components like a Minimap 🗺 and utilities to interact with state and graph.

TypeScriptnpmMIT Licensevuevue3
vueflow.dev
6.7k405
jerosoler/Drawflow

Simple flow library 🖥️🖱️

JavaScriptnpmMIT Licenseflowjavascript
jerosoler.github.io/Drawflow/
6.1k881