跪拜 Guibai
← All articles
Backend

A 98KB Workflow Engine Makes Sense When You Only Need Approvals, Not a BPM Platform

By mldong ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Most teams asking "what should I use for approvals?" default to Flowable without calculating the hidden tax: 70+ foreign tables in their schema, a BPMN 2.0 learning curve for every new hire, and upgrade paralysis. A bounded, 98KB engine with 8 tables and no framework dependency offers a genuine alternative when the requirement is approval, not a full BPM platform.

Summary

Flowable, Activiti, and Camunda are built for complex BPM platforms, not for embedding a simple approval module inside a business application. Their cost shows up as dozens of engine-owned tables, framework coupling, a long BPMN learning ramp, and upgrade trauma that leads teams to freeze versions permanently. When process patterns are fixed—initiate, approve, reject, jump, countersign, delegate—a 98KB zero-dependency engine with 8 tables and a flat JSON-based process definition becomes the more rational trade-off.

The calculus isn't about saving effort; it's about swapping one cost structure for another. A self-built engine shifts the burden from learning someone else's sprawling specification to maintaining your own bounded complexity. That trade only pays off when the latter is genuinely smaller.

jeeflow, extracted from the mldong rapid development framework, embodies this bet: DDD aggregate roots, a 6+5 SPI extension system, and isomorphic implementations across Java, Go, Python, and Node. It doesn't try to be a BPM platform—it stays an approval engine that integrates deeply with whatever framework already exists.

Takeaways
Flowable, Activiti, and Camunda are BPMN 2.0 platforms built for complex process orchestration, not for embedding a simple approval module in a business system.
Flowable ships with 70+ engine tables, multi-megabyte jars, and requires Spring integration; Camunda's platform edition is an entire suite.
BPMN 2.0 itself is a heavy specification—swimlanes, sub-processes, boundary events—that demands weeks of study before drawing a basic leave-approval flow.
Major version upgrades of these engines often break APIs and require table migrations, leading many teams to never upgrade at all.
A lightweight self-built engine makes sense when process patterns are fixed (initiate, approve, reject, jump, countersign, delegate) and the engine must integrate deeply with existing framework conventions.
jeeflow weighs 98KB, uses 8 tables (5 core + 3 management), has zero framework dependencies beyond slf4j-api, and defines processes as LogicFlow JSON instead of BPMN XML.
The engine exposes a 6-core + 5-extension SPI system so any processing link can be replaced, and it ships in four isomorphic language implementations: Java, Go, Python, and Node.
Self-building isn't free—it moves cost from learning external complexity to maintaining internal complexity, and is only worthwhile when the internal complexity is genuinely smaller.
Conclusions

The weekly recurrence of the same approval-engine question in backend groups suggests a persistent gap between what teams actually need and what the default answer prescribes.

Framing the choice as a cost-structure swap rather than a build-vs-buy decision is more honest: both paths carry maintenance burdens, just in different places.

Version-freeze as an unspoken industry norm for BPM engines signals that upgrade friction is a real operational cost, not just a theoretical concern.

Shipping the same engine in four languages from the start is an unusual design choice that targets polyglot organizations directly, rather than treating non-Java runtimes as an afterthought.

Concepts & terms
BPMN 2.0
Business Process Model and Notation 2.0—an XML-based standard for describing business processes visually using swimlanes, events, gateways, sub-processes, and other constructs. Full implementations are complex and carry a steep learning curve.
LogicFlow JSON
A JSON-based process-definition format used by the LogicFlow visualization library, representing workflows as nodes, edges, and expressions. It avoids the XML and specification overhead of BPMN 2.0 while remaining machine-readable and renderable in a visual designer.
SPI (Service Provider Interface)
A plugin mechanism that lets an engine's internal processing steps be replaced or extended by providing custom implementations. jeeflow defines 6 core SPIs and 5 extension SPIs, making every processing link swappable without modifying engine source.
DDD Aggregate Root
In Domain-Driven Design, an aggregate root is the top-level entity that enforces consistency boundaries for a cluster of related objects. jeeflow models its process instance as a DDD aggregate root, meaning all state changes to a workflow instance are guarded through a single entry point.
From the discussion

The practical value of defining clear use-case boundaries resonated, while a concrete need emerged for lowering the barrier to entry: an online demo and a flowchart designer accessible to non-technical users.

Scenario boundary analysis is the article's most useful contribution.
An online demo site would help potential users evaluate the engine.
The tool needs a flowchart designer that people unfamiliar with workflow concepts can use.
Featured comments
牧码牛

It would be best to have an online demo site, and a way for people who don't know much about workflows to draw flowcharts

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗