Deciding About Your Stack

Camunda can be flexibly hooked into the architecture of your choice. Properly define a stack fitting into your environment and company by using the decision criteria presented below - as this will have big influence on the overall architecture. But if you do not have special architecture requirements you might want to simply choose our recommended "Greenfield Stack".
Deciding About Your Stack is also related to
Deciding About Your Stack
This article is still in flux, as we continuously improve it. Please note that important options or forces might still be missing. Discuss with our consulting team if in doubt!

Considering the GREENFIELD Stack

Note that we propose a Greenfield Stack. Use this stack whenever you do not have special requirements driving you in another direction. Using this stack eliminates the burden of going through all the options and decisions discussed below. The greenfield stack is composed of proven components fitting for many environments.

Selecting the Process Engine Mode

Container-Managed Engine

Embedded Engine

Remote Engine

Run the engine as a service preconfigured in your Java EE container.

Use the process engine as a simple library right within your own application, typically started via Spring Boot GREENFIELD .

Run the engine as an isolated BPM server only communicating with it via Web Services.

Engine Bootstrap / Lifecycle Management

Out-of-the-box

Out-of-the-box for Spring Boot, otherwise do-it-yourself
(see options below)

The Remote Engine is bootstrapped either as embedded or container-managed engine

Camunda Webapps
work in all use-cases

See limitations below

Camunda REST API
works in all use-cases

See options below

Multiple Process Applications can share a central engine

Doable with a shared database, but requires custom development and has limitations

Multiple Engines can share resources (e.g. share the Job Executor)

One application WAR/EAR can include the process engine

Supports untouched ("vanilla") containers

Runs in every Java environment

On Supported Containers

Development Effort

Minimal

Depends

Responsibility for Engine Installation and Configuration

Operations or
Application Developer

Application Developer

Application point of view on process engine

Library

Library

Remote Server

Possible communication types with services

Java InVM, Remote

Java InVM, Remote

Remote

Use when

You use a supported application server and prefer to seperate engine installation from application development

You use Spring Boot GREENFIELD .

Your architecture or applications are not Java based.

You want a single deployment including the engine.

You cannot touch your core application.

You cannot make changes to your container.

For security, your BPM platform is separated from applications.

You use a container we do not support.

Learn More

Learn More

Learn More

The Remote Server is not really a different engine mode, as you still have to operate the server. Therefore you run a container with an engine, which might be embedded or container-managed again - just as discussed in the first two columns of the table above.

Using a Container-Managed Engine

The container managed engine allows to separate installation and configuration of the engine from the application development. This is an advantage if you really separate these roles within your organization. However, we experienced that this causes trouble more often than it does help. Developers most often are still responsible to install the engine, but might not be able to access the application server itself.

That also explains the rise of Spring Boot (often alongside with Docker) and many projects successfully moved to that approach, which became our greenfield recommendation.

Understanding Embedded Engine Specifics

Using Spring Boot

The Camunda Spring Boot Starter is a clean way of controlling the embedded engine easily, so you don’t have to think about the specifics mentioned below in this section. This makes Spring Boot the GREENFIELD choice for Camunda projects.

Bootstrapping the Engine and Managing its Lifecycle

When running the engine in embedded mode you have to control the lifecycle of the engine yourself, basically starting up and shutting down the engine - and providing access to the API whenever a client needs it. You have several options to do that.

Spring Boot

Spring Application Context

processes.xml

Programmatic

Configure, start and stop the engine via Spring Boot Starter

Configure, start and stop the engine via Spring Beans defined in your Application Context.

Configure, start and stop the engine via Camunda’s processes.xml descriptor and a ProcessApplication class.

Configure, start and stop the engine yourself programmatically by using Java code.

Use when

You target Spring Boot as runtime environment.

You already use Spring.

You do not want to introduce a Spring dependency just for Camunda.

You need full control over the engine or want to do advanced customizations.

Unlimited Configuration Options

Development Effort

Low

Medium

Low

High

Providing a REST API

When running an embedded engine it might be harder to deploy the pre-built REST API.

Use Spring Boot Starter for REST API

Embed Camunda’s REST API

Use Camunda’s Standalone Web App REST API

The Spring Boot Starter allows to run the REST API as well as the Camunda web applications.

Provide Camunda’s REST API by embedding its JAX-RS code into your application.

Deploy Camunda’s "Standalone" Web Application (which runs its own engine) and use its REST API.

No Classloading Restrictions

Development Effort

Low

High

Low

Providing Camunda Web Applications (Tasklist, Cockpit)

When running an embedded engine you still may want to use Camunda Web Application like e.g. Tasklist and Cockpit, but have to decide how exactly to run these web applications in your environment.

Use Spring Boot Starter for Camunda Web Applications

Camunda "Standalone" Web Application

Embedded Camunda Web Applications

The Spring Boot Starter allows to run the REST API as well as the Camunda web applications.

Deploy Camunda’s "Standalone" Web Application, which is a WAR running its own engine - and point it to your applications engine database.

Embed the Camunda Web Applications into your own application - which is not a particularly easy task to do.

Classloading Restrictions

None

You can e.g. not submit a task in tasklist when a following synchronously called service uses a class contained in your own application. However, you can solve this by adding additional safe points.

None

Development Effort

Low

Low

High (undocumented)

Spring Boot Starter

Download Standalone Web Application

Implement e.g. via Maven WAR Overlays

Choosing a Programming Framework

Spring

Spring Boot
GREENFIELD

CDI

OSGI / Blueprint

The Java EE alternative to write JVM based systems.

Spring applications with convention over configuration.

Contexts and Dependency Injection (CDI) for Java EE.

A Dynamic Module System for Java.

Use to Control Embedded Engine Lifecycle

Use Named Beans in Expression Language

Required Skill Level

Spring basics to get started

Spring Boot basics to get started

CDI basics to get started

Big experience with OSGI, introduces complexity many customers struggle with

Use when

Use the framework you are already experienced with!

Supported in
Enterprise Edition

Community Extension

Learn More

Learn More

Learn More

Learn More

Choosing a Container / Application Server

Java SE containers

Wildfly

Other Java EE containers

Unsupported Containers

OSGI
Containers

Tomcat (see supported Java SE environments)

Spring Boot Starter
GREENFIELD

JBoss AS, Wildfly, Glassfish,
IBM WAS, Oracle WLS (see
supported Java EE environments)

Apache Karaf

(Out-of-the-box) JTA Transaction Integration

()

Maybe

Java EE Features
(JPA, JSF, CDI, …​)

()

Maybe

Engine
Mode

Container-Managed Engine

Community Extension

Embedded Engine

Supported with
Enterprise Edition

Engine only

Engine only

Use when

Use the container you already operate or are experienced with!

Tomcat

Spring Boot

Wildfly, Glassfish,
IBM WAS, Oracle WLS

Apache Karaf

Considering the User Interface

Understanding the Use Cases

In the User Interface you might have different components, for which you might even decide differently.

Organisation Internal

Public

Tasklist Application

Custom Business Application

Monitoring and/or Reporting Application

Internet Website

A (central) dedicated tasklist, showing tasks from potentially different contexts.

Your business application includes use cases steering the process engine.

An application showing state of processes, based on instances or as statistics.

Your internet website e.g kicks of process instances when a user submits an order.

Target Group

All employees

Specific employees

Operators (Business/Technical)

Customers

Published in

Intranet

Internet

Required Usability

Generic tasklist, customizable for roles

Tailored to a specific business use case

Different for business or technical operations

Easy-to-use modern web application

Required Technology

Use technology of business application

Use modern HTML5 stack

Possibility to Reuse

See also Deciding About Your Tasklist

Learn more about Camunda Cockpit

Choosing a User Interface Technology

HTML5

Java UI Frameworks

Non Java Technology

Portal

e.g. JavaScript, AngularJS

e.g. JSF, Vaadin, Wicket

e.g. PHP

e.g. Portlets, Liferay

Learning Curve for
Java Developers

high

low

medium

depends on portal

Typical Use Cases

Single Page Applications

Java-based Applications and Form-based Applications

Standalone Web Applications

Company wide portals

Use when

Use the framework you are experienced with or want to build up experience with!
(Don’t forget about the learning curve!)

Creating Custom Process Applications

The recommended way to implement and deploy BPMN processes on the Camunda Platform are Process Applications. However, strictly speaking this section deals with developing and deploying BPMN/CMMN/DMN solutions, independent of the question if they are implemented as Process Applications in the narrow sense.

Choosing a Deployment Artifact Format

JAR
GREENFIELD

WAR

EAR

Custom Deployment

Simple Library
(JAR file)

Web Archive
(WAR file)

Enterprise Archive
(EAR file)

Custom mechanism,
e.g. UI deployment

Deployment potentially decoupled from Java Deployment

Advanced Modularization


(see Is Java EE 6 War The New EAR?)

Out-of-the-box Classloading with multiple deployments in container-managed engine scenario



Engine
Mode

Container-Managed Engine

Embedded Engine


(Uber jar of Spring Boot)


(engine is part of WAR)


(engine is part of EAR)

Use when

Always for Spring Boot, seldom otherwise.

Always, if there is no reason driving you in a different direction.

You need an EAR because of your requirements.

You have special requirements to deploy via API, UI etc.

Using a Build Tool

Maven
GREENFIELD

Gradle

Ant

Other

Manages a project’s build, reporting and documentation from a project object model (POM) file.

Automates projects written in Java and other JVM languages, including Groovy, Scala and Clojure.

Java build tool driving tasks and processes described as targets dependent upon each other.

Used in Camunda examples

Use when

Always, if there is no reason driving you in a different direction.

If you already use Gradle and have experience with it.

Try to avoid

Try to avoid

Learn More

Learn More

Learn More

Persisting Your Own Entities

You might want to persist entities along with your process in your process applications. Independent of the technology you use make sure that you have proper transaction integration with the Camunda Platform, typically done via JTA. This is automatically true for Java EE environments using the container-managed engine.

JPA

MyBatis

JDBC

Industry standard for POJO based mapping between object oriented and relational paradigms.

Persistence framework with support for custom SQL, stored procedures and advanced mappings.

SQL "call level" industry standard for connectivity between the JVM and a wide range of databases.

Introduced Dependency

JPA Implementation, already present on Java EE servers

Apache MyBatis, already introduced by Camunda

JDBC driver, already present for Camunda

Use when

You have business entities

You need more fine grained control over the SQL issued

Try to avoid direct usage

Learn More

Learn More

Learn More

Choosing a Database

Camunda requires a relational database for persistence.

Even if the persistence provider can be plugged and e.g. exchanged by some NoSQL persistence this is neither recommended nor supported. Therefore, if you have use cases for this discuss them with Camunda beforehand!

PostgreSQL
GREENFIELD (Prod)

Oracle

H2
GREENFIELD (Test)

Other Database

PostgreSQL is an open source object-relational database system.

Oracle Database is a commercial object-relational database system.

H2 is a Java SQL database with in-memory mode and a small footprint.

Best Performance Observations

In-Memory Mode

No installation required

Recommended for Production Use


(if supported)

Use when

Use the database you already operate or are experienced with!

Learn More

Learn More

Learn More

Supported Databases

Modeling for Executable Processes

We distinguish two different roles modeling in BPM projects:

  • Process Developers develop an executable process implementation. Process developers implementing solutions with Camunda must use Camunda Modeler to model executable processes, edit technical attributes and manage and version (e.g. in Git or SVN) the resulting (XML) files as part of the development project.

  • Process Analysts capture the operational know how about a process. For this part of the work, it is possible to use a different tool than Camunda Modeler.

Camunda Modeler GREENFIELD

Third-Party Modeler
(BPMN Standard Compliant)

Third-Party Modeler
(Non-Compliant to Standard)

Roundtrip in between process analysts and developers possible


(Carefully check level of BPMN compliance - the Model Interchange Working Group can serve as a first starting point)

Use for

Process Analysts

Process Developers

Use when

You do not have a BPMN standard compliant modeling tool already rolled out.

You already rolled out a BPMN tool with a standard compliancy sufficient for roundtrip.

Try to avoid

Download

e.g. Cawemo

No guarantee - The statements made in this publication are recommendations based on the practical experience of the authors. They are not part of Camunda’s official product documentation. Camunda cannot accept any responsibility for the accuracy or timeliness of the statements made. If examples of source code are shown, a total absence of errors in the provided source code cannot be guaranteed. Liability for any damage resulting from the application of the recommendations presented here, is excluded.

Copyright © Camunda Services GmbH - All rights reserved. The disclosure of the information presented here is only permitted with written consent of Camunda Services GmbH.