Camunda — Developer friendly BPMS

Here is the short introduction to Camunda BPM ( from the developer point of view. It is a blog post about the presentation I`ve made at TechWeeklies in Futurice, my current employer.

Image for post
Image for post
Workflow and decision automation

Introduction to workflow automation

Maybe it sounds too enterprisey, but it is a piece of technology which allows you to separate your frontend + APIs from business artifacts like processes, rules, and roles.

It is not applicable to every project out here, but if your project has:

  • Process oriented, i.e., you have workflow of managing things like documents, requests or applications between multiple users, APIs, frontends and systems.
  • Lots of different processes, multiple roles, and integrations between systems
  • Long-lived processes, i.e., process spans days, months, even years.
  • Processes defined by business (customer, analysts) and frequently change along with rules and roles

you might benefit from using BPM methodology.


What is Business Process Management

  • Methodology to manage (identify, monitor, improve) processes “independently” from apps, code, and infrastructure
  • Define how you make decisions during the process — decision rules
  • Understand roles (groups of users)
  • Identify services (APIs and integrations)
  • Design user interfaces (web, mobile)

What is BPM, BPMS, BPM Suite, engine?

  • BPM — Software methodology. Ways of doing discovery, definition, control, and analytics of processes
  • BPM Suite — Everything is included (processes, decisions, security and UI editor). Sold as “no programmer required”, “business analysts do all the app”, “low code” and other myths for $$$$ amount (IBM BPM) or OSS with the freemium model (Bonita BPM)
  • BPM engine — an embeddable framework for building apps which use BPM. Notable examples: Activiti BPM, jBPM, Camunda BPM
  • BPMN — Business Process Management Notation — XML based format for defining processes and visual language to represent it. Examples of standalone editors:, Camunda Modeler, Yaoqiang BPMN Editor
  • Not a BPM but workflow automation: Pega Systems’ Pega Platform
  • Not a BPM but rule & decision management: RedHat Drools OSS, IBM ODM, FICO Decision Management Suite, Experian Transact SM

Why do I need to use BPM?

Business process management usually operates two tightly coupled principles — workflows and rules

Image for post
Image for post

BPM systems allow you to define workflow visually by using standardized building blocks called BPMN (see Camunda BPMN documentation for detailed explanation)

BPMN allows you to implement essential non-functional bits of a high-quality distributed system:

  • Retries
  • Error handling (compensation)
  • Workflow metadata collection
  • Parallel processing

and more…

There are some ways people are usually following to implement business logic. It usually involves code and database tables to hold frequently changed rules, data and “constants”.

Image for post
Image for post
  • Not transparent (can be seen and explained by developers only)
  • Difficult to change (need to commit and deploy)
  • No versioning (without custom approach, after deploy, all app start using new rules)
  • No history of process execution
  • Schema change if rules change
  • Multiple different tables
  • Need to orchestrate tables by code
  • Not part of the codebase (not testable)
  • Need to create custom editor UI

Camunda and Decision model and notation allows defining rules as a domain-specific, highly customizable table

Image for post
Image for post

By combining these DMN tables you can create easy to use, powerful decision making process.

Why Camunda?

Granted there is a lot of choices available when you consider open-source BPMN engine for your app (all of them in Java though) — Activiti BPM, jBPM, Camunda BPM. But there are great things about Camunda BPM you should consider:

  • Made in Berlin
  • Good support in Github Issues (I tested it myself, the issue was actually promptly fixed)
  • Modern Java 8
  • Spring Boot2 compatible (but you can run it differently — container, Java EE app, etc.)
  • Docker support + it does scale
  • Microservice architecture compatible
  • Swagger / GraphQL + bring your own APIs (fluent builder style Java API on top of which you can create REST APIs yourselves)
  • Embeddable, online and desktop modeler/editor
  • Customizable
  • Processes are unit testable
  • Great docs — BPMN & API

Camunda BPM components

Image for post
Image for post

Javascript based, awesome editor available for BPMN. If can use it standalone and with or without Camunda BPM engine, if you like.

Also available in the cloud at

It is based on open source NodeJS package —

Java8+ engine which can be integrated into the Java application. The recommended way to do it is use Spring Boot2, but you can also use Java EE or WAR deployment to the application server.

Spring Boot2 default application packs a number of embedded web applications which help you monitor and execute your processes.

Image for post
Image for post

Cockpit — control how your processes are executed and can see which processes executed now.

Image for post
Image for post

You can use it to start processes and execute user tasks without dedicated UI written.

Best practice infrastructure for Camunda BPM

Utilizing microservice architecture it is easy to run Camunda engine as REST/GraphQL API in docker.

Image for post
Image for post

Sample application

For presentation and this blog post, I`ve created example application with simple process and rule decision table:

This application illustrates all important topics:

  • Camunda engine
  • Camunda web applications
  • Authorization
  • Deploying processes and rule decision tables
  • External service tasks
  • Unit testing the processes
  • SwaggerUI for APIs (both app-defined and Camunda REST)
  • Launchpad — page with all the components accessible

To run it, you need Java8 and Maven installed.

Image for post
Image for post

Update (2019–04–14)

Try to run Camunda in 5 minutes by using Google Cloud Run, see my next article:

Links and further reading

Written by

Tech Lead & Software engineer with a passion for #DevRel, Serverless, Java, and Javascript.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store