Lightweight BPMN Engine for Go

Tired of complex Java BPMN platforms? Embed our Go-native workflow engine—small, fast, JSON‑driven, MIT‑licensed.

Check out the GitHub repo for full specs and usage examples.

Architecture diagram of Go BPMN Workflow Engine
Workflow Engine architecture: JSON format, signals, timers, script/service tasks.

I built the Workflow Engine using a light JSON BPMN standard because every time I needed real BPMN-style orchestration in a Go application, I had to fight through heavy, Java-based platforms. They brought too much complexity, too many dependencies, and not enough control.

This engine solves that. It’s written entirely in Go, runs in-process, and uses a compact JSON-based format I call JBPMN to model executable workflows. It’s designed for real-world applications where you want workflows embedded in your logic, not bolted on from the outside.

If you're working in Go and want composable, event-driven process automation without dragging in containers, JVMs, or XML, this project is for you.

Why I Created Workflow Engine

Most BPMN tools lean on XML. That makes sense for full enterprise stacks, but it doesn’t translate well to the modern developer experience. I wanted a schema that could be stored, loaded, and manipulated like regular data. So I created Workflow Engine, a clean JSON structure for workflows.

Workflow Engine supports core BPMN concepts like tasks, gateways, timers, and signals. It strips out the clutter and gives you a predictable format that works with real-time engines and modern development practices. It’s easier to test, easier to integrate, and far easier to reason about.

Engine Features

Here’s what the engine supports today

Script Tasks

Workflows often need logic. With script tasks, you can execute secure JavaScript inside your workflow using vm2. These scripts can evaluate rules, mutate the process context, or determine dynamic routing.

Service Tasks

You can bind service tasks to Go functions or handlers that perform actions like API calls, database writes, or external integrations. This lets your workflows trigger real outcomes and remain declarative in structure.

Gateways

The engine supports exclusive, parallel, and inclusive gateways. You can branch flow logic based on JavaScript conditions that evaluate against the current process context. You can also throw signals directly from gateways when a condition is met.

Signal-Based Modularity

Instead of traditional subprocesses, this engine encourages modular design through signals. You can build workflows that end with a signal.throw and others that begin with a signal.catch. This creates loosely coupled process chains. One workflow can emit a signal like user:registered, which another workflow listens for and executes accordingly.

This design supports real-time orchestration across multiple flows and scales naturally across contexts like onboarding sequences, notification triggers, or integration handoffs.

Timers and Timeouts

Start nodes can be scheduled via cron timers, and tasks like forms or scripts can define timeout behavior. If a task isn't completed in a given time, the workflow can follow an alternate path, notify a user, or escalate.

Start and End Events

Every process starts with a start node and finishes with an end node. You can configure start nodes to listen for signals or trigger based on time. End nodes can emit signals that kick off other processes, log final state, or finalize a user-facing action.

Use Cases

The engine is designed for systems that need process automation without the complexity of an external workflow engine.

Embedded SaaS Logic

Let each tenant define workflows that are stored as JBPMN definitions. These can be executed in their own isolated contexts without spinning up multiple engine instances.

Microservice Orchestration

Use workflows to coordinate steps between services. Define logic declaratively, emit signals to trigger next stages, and keep orchestration code minimal and observable.

IoT and Edge Processing

Deploy to constrained environments and run local workflows triggered by events or time. The engine’s small footprint and pure Go architecture make it ideal for edge automation.

Internal Tooling

Model business logic cleanly without burying rules in code. Create workflows for approvals, form intake, user journeys, or compliance checks. Each process stays modular and easy to update.

A Lightweight Alternative to ProcessMaker 4, Camunda & Zeebe

ProcessMaker 4, Zeebe, and Camunda are all powerful, full-featured platforms that excel in complex enterprise environments. However, for Go developers seeking to embed process automation directly into their applications, their architecture often presents a significant challenge. These platforms frequently require running external Java-based clusters, containers, and complex REST gateways, adding considerable weight and overhead.

This Workflow Engine was built as a direct alternative. Instead of bolting on a heavy external layer, our engine runs in-process, written entirely in Go. It uses a compact JSON-based format called JBPMN to model executable workflows. This is a better solution for developers and teams focused on embedded SaaS logic, microservice orchestration, and edge computing, where tight control, fast execution, and minimal dependencies are critical. You get the power of declarative BPMN to model control flow, execute logic, and coordinate events—all without the weight of a full BPMN suite.

,

Open Source and MIT Licensed

This project is licensed under MIT. You can use it in commercial apps, internal tools, open source projects, or anywhere else without restriction. No open-core gotchas. No cloud lock-in. Just Go code doing real work.

Get Started

The full spec for Workflow Engine is available in the repo. It’s compact, expressive, and designed to support timers, signals, gateways, and task-level timeouts.

GitHub: https://github.com/velkymx/workflow-engine
License: MIT

If you find it useful, star the repo. If you want help using it, integrating it, or expanding it for your own use case, reach out.

I designed this engine because I needed it. If you’re tired of bloated workflow infrastructure, I think you might need it too.

Ready to Build?

Ready to build a world-class, scalable process architecture? AJBApps is here to help. As the original architect of ProcessMaker 4, we have unparalleled expertise in designing modular BPMN 2.0 workflows that are efficient and resilient. Whether you’re looking to refactor a monolithic process or expand your automation portfolio, we can guide you in applying these subprocess patterns (and many more) effectively. Contact AJBApps for a consultation and let’s turn your process ideas into an orchestrated reality – with best-practice design and expert insight at every step.