Home / Blog / Simulate a BPMN process without Camunda

Simulate a BPMN process without Camunda

Testing a BPMN process usually means deploying it to a running Camunda cluster, starting an instance, and watching what happens — slow feedback for something that should be a unit test. @bpmnkit/engine is a zero-dependency BPMN simulation engine that runs entirely in-process, in the browser or Node.js, with no Camunda deployment required.

Deploy and run in-process

import { Engine } from "@bpmnkit/engine";

const engine = new Engine();
await engine.deploy({ bpmn: xml });

engine.registerJobWorker(
  "greet",
  async (job) => {
    console.log("Hello!");
    await job.complete();
  }
);
engine.start("hello");

engine.deploy() parses and validates the BPMN XML — the same XML you’d deploy to Camunda 8 — and registerJobWorker() attaches a handler to a Zeebe job type exactly like a real worker would. Because the whole thing runs in-process, a test that exercises a full process — gateways, timers, message correlation, DMN evaluation — runs in milliseconds instead of round-tripping to a cluster.

What it supports

The engine covers the parts of BPMN that matter for realistic testing:

  • Service and user tasks — job workers and manual task completion
  • Gateways — exclusive, parallel, and inclusive, with FEEL condition evaluation
  • Timers — timer events and boundary timers, advanceable in tests
  • Message correlation — message start/intermediate events matched by correlation key
  • DMN evaluation — business rule tasks evaluated against a decision table, no separate DMN engine needed

Why this matters for CI

A process generated by @bpmnkit/core can be deployed to the simulation engine and exercised in the same test run that generated it — catching a broken gateway condition or an unreachable end event before the diagram ever reaches a real Camunda cluster. That’s a meaningfully different feedback loop than “deploy, click through Operate, see what happened.”

Where to go next