Using a Greenfield Stack

Camunda is very flexible and can be hooked into the architecture of your choice, giving you a number of important decisions to make. But if you don't have special architecture requirements, we recommend to simply use this proposed greenfield stack.
Using a Greenfield Stack is also related to
Using a Greenfield Stack

Introducing the GREENFIELD Stack

The greenfield stack is currently a recommendation for Java developers.

We are working on a greenfield recommendation for using different stacks (like .NET or JavaScript). For now please refer to e.g. this blog post on how to use Camunda in a polyglot world.

  1. Start your process automation project as a Spring Boot application, using the Camunda Spring Boot starters for the REST API and the Web applications.

  2. Build your project with Maven.

  3. Use Eclipse as IDE,

  4. Use the Enterprise Edition of the camunda-engine and the camunda-webapp.

  5. Use OpenJDK 11 as Java runtime.

  6. Model the processes with the Camunda Modeler

  7. Add your process models and the java code to the project

  8. Use the H2 file based java database for development. We strongly discourage that multiple developers share the same database during development as this can lead to a multitude of problems.

Running the process application in production:

  1. Use PostgreSQL - or the database you already operate.

  2. Secure the Rest-API. See this example

  3. Run the process application by copying the jar-file to the server and start it with java -jar YourProcessApplication.jar

Understanding the Stack’s Architecture

The basic architecture with this stack is shown in the following diagram:

greenfield architecture

See more details on architecture decisions in  Best Practice Not Yet Published.

The Spring Boot application contains an embedded tomcat server to serve the external interfaces. The process engine is embedded. A cluster can be built by starting more instances using the same database.

Understanding Our Motivation for the Stack

While we went through long and detailed discussions in order to come to this recommendation - it doesn’t mean that it is necessarily superior to alternative stacks. So you can still feel good if you go down another route (see Deciding About Your Stack for alternative options). But for the best practices we wanted to give exactly one greenfield recommendation for all our customers who have no special requirements on the stack.

We decided for this stack because:

  • All components are open source and easily available,

  • Spring Boot is currently the most adopted way of buidlind Java applications

  • PostgreSQL has a great track-record for performance.

  • Spring Boot applications are easy to customize as well as easy to roll out into test- and production environments, either on premise or in the cloud.

There are advantages using the greenfield stack:

  • Fewer Decisions: Depending on your experience with the Java cosmos, the decisions to chose a stack might not be easy to take. So if you don’t have special requirements take that burden from you and follow a well-known path.

  • Less Ramp-Up-Effort: We provide pre-packaged distributions, examples, documentation and installation guides for the proposed stack.

  • Proven: Many of our customers use this stack with great success.

  • More Documentation & Best Practices: So you don’t have to write your own extensive documentation - just point to the Camunda docs.

  • Easier Support: Asking for help gets much easier as you do not have to explain your setup in detail.

  • Project Templates and Examples: We provide project templates (as Maven Archetypes), which might directly fit for you.

Customizing the Stack

It is perfectly fine to choose another stack if you have good reasons for it. For example you might want to:

  • Use the database you already operate. Add the database driver to the pom.xml and configure the jdbc url in the application.yml accordingly.

  • Drop the camunda-bpm-spring-boot-starter-rest from the pom.xml if you don’t need it.

  • Drop the camunda-bpm-spring-boot-starter-webapp from the pom.xml if you start a separate server for Cockpit. In this case, set the deployment-aware configuration to true.

Getting Started with the Greenfield Stack

  1. Check the Prerequisites:

  2. Create your project

    • Use the Maven Archetype 'camunda-archetype-spring-boot' to create a new project.

    • Model a process with the Camunda Modeler and save it under src/main/resources.

    • Run the project from your IDE: start CamundaApplication as Java Application.

    • Play around with your process using the Camunda Webapp (Tasklist and Cockpit).

    • Package your application with mvn clean install.

    • Bring the jar file to your test or production server and start it there.

    • You can setup or integrate it into an existing Continous Delivery Pipeline.

  3. Learn more about Testing Process Definitions and add unit tests to your process!

Check out Camunda Spring Boot tutorial for more details how-to get going!

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.