Software Engineering

Camunda Spring-Boot Starter Project Setup

Camunda BPM Spring-Boot Starter

In course of my current project I experimented with Camunda BPM Spring-Boot starter throughout this week. Within this post Camunda Spring-Boot project setup using Apache Maven will be described.

Camunda Spring-Boot Starter POM

First of all, a standard Spring-Boot Starter project has to be created. Afterwards required Camunda dependencies can be added. The easiest setup can be achieved using Camunda’s BOM.

Depending on your specific needs, additional dependencies like REST API capabilities and Camunda web applications can be added.

In addition, a database should be provided for Camunda’s database schema. For development and testing purpose a h2 in-memory database can be used.

A specific Camunda version can be used by providing it as value to dependency version tags throughout the POM. As it might be required to specify the version multiple times, it should be defined as property and reused.

In order to start a Camunda BPM engine on application startup,  @EnableProcessApplication annotation must be added to Spring-Boot application definition.

Finally, process and case definitions must be placed in the src/main/resources folder. Afterwards a Camunda BPM engine should be initialized on application startup, all process definitions should be deployed and can be used.

Camunda BPM Spring-Boot Starter

In my opinion this setup can be very beneficial for BPMN projects. First, Spring Framework capabilities can be used to implement your process delegates. Second, in order to scale your process application and engine one just has to start another application instance. Third, as we obtain a Fat-JAR after packaging our application it can be containerised quite easy. Therefore, this approach fits perfectly in current trends regarding infrastructure as code and DevOps.

Further Reading

Camunda Spring-Boot GitHub Repository – Examples and Documentation

Camunda Spring-Boot Reference Documentation

Camunda Spring-Boot Starter Maven Repository

Unsere Leistungen im Bereich Software Engineering

Software Engineering