DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • External Task Client Implementation in Camunda With Spring Boot Application
  • A Practical Guide to Creating a Spring Modulith Project
  • Creating Application using Spring Roo and Deploying on Google App Engine
  • Distributed Tracing System (Spring Cloud Sleuth + OpenZipkin)

Trending

  • How To Build Resilient Microservices Using Circuit Breakers and Retries: A Developer’s Guide To Surviving
  • IoT and Cybersecurity: Addressing Data Privacy and Security Challenges
  • Introduction to Retrieval Augmented Generation (RAG)
  • Intro to RAG: Foundations of Retrieval Augmented Generation, Part 1
  1. DZone
  2. Coding
  3. Frameworks
  4. Running Spring Boot Application With Embedded Camunda Engine

Running Spring Boot Application With Embedded Camunda Engine

In this article, see how to set up a Spring Boot application with embedded Camunda engine and Camunda BPM Initializr.

By 
Alok Singh user avatar
Alok Singh
DZone Core CORE ·
Updated Apr. 26, 22 · Tutorial
Likes (10)
Comment
Save
Tweet
Share
49.4K Views

Join the DZone community and get the full member experience.

Join For Free

This article was originally published in May 2020.

I'm sure you're familiar with Camunda BPM or any other BPMN tools. In this article, we are going to have a quick look at how to set up a Spring Boot application with Embedded Camunda Engine. To achieve this, I am going to get help from Camunda BPM Initializr, which is a web-based tool to generate Spring Boot applications integrated with Camunda engine capabilities.

Prerequisites

  • Eclipse (any version) with Maven capabilities
  • Java 8+

Creating a Simple Spring Boot Project With Camunda Engine

1. Click on the link: Camunda BPM Initializr

Camunda BPM Initializr

Explanation:

  • Group: Fill a groupId for the project of your choice.
  • Artifact: Fill artifactId for the project of your choice.
  • Camunda BPM Version: Next, need to choose Camunda BPM Version from drop-down where multiple Camunda BPM versions are listed. For more details click Camunda BPM Versions.
  • H2 Database: For the supported H2 Database, there are two different options given. Know more about H2 Database and Spring Boot by clicking here.
  • Java Version: Choose Java version from the drop-down. For now, choose Java 8.
  • Camunda BPM Modules: Camunda BPM Modules can be added if there is a need to add Camunda REST APIs or Camunda Webapps support in the application.
  • Spring Boot Modules: Additional Spring modules can be added.
  • Further, username and password can be set, which is required for example using a Camunda cockpit application login.
  • After filling the details, you can explore the project using "Explore Project" Option.

Project Explorer

  • Finally, click on "Generate Project" and download the {{artifactname}}.zip and extract it in your local workspace.

2.  Use Eclipse IDE to run the project.

  • Import the extracted project in Eclipse IDE as "Existing Maven Project"

Import the extracted project in Eclipse IDE

Click on Finish. The project directory can be found below.

Project Directory

  • The project consists of files such as:
    • Application.java: To run the Spring Boot application
    • process.bpmn: Simple workflow diagram which will run later in the section

Say hello to Camunda

  • application.yaml: Configuration file. Here, add the below additional properties, which will be later useful to see the schema generated by Camunda Engine.
    • spring.datasource.url: jdbc:h2:file:./camunda-h2-database
    • spring.h2.console.enabled: true
  • pom.xml: Consists of all the dependencies required to run the application. Add one additional dependency, which will be useful later to see the Camunda schema as below.
XML
 




xxxxxxxxxx
1


 
1
<dependency>
2
<groupId>org.springframework.boot</groupId>
3
<artifactId>spring-boot-starter-data-jpa</artifactId>
4
</dependency>



  • Select project and right-click -> Run As -> Maven Install.

Run As Maven Install

  • After a successful build, open Application.java and right-click -> Run As -> Java Application.

Run As Java Application

3. Starting process.bpmn using Camunda cockpit and tasklist web-apps.

  • Open browser and enter URL http://localhost:8080/.

Camunda Sign In

  • Enter username/password and welcome to access the Camunda web apps. W are going to use Cockpit and Tasklist mainly for this tutorial.

Camunda Welcome Applications

  • Click on Cockpit to see the number of processes deployed automatically when Spring Boot app is started.

Camunda Cockpit Number of Processes Deployed

1 Process Definition Deployed

  • Click on the deployed process to see the deployed process diagram.

Deployed process program

  • Click on tasklist webapp (ref Section 3.b).

Camunda Tasklist Webapp

  • Click on "start process" and start the process.
  • You can see that one task is appearing in the task list.

Camunda Tasklist

  • Refresh the Cockpit app to see the running process instance. Note that the process started and is waiting at the user task.

Camunda Cockpit Processes

4. Before completing this process, have a look at the database schema and related entries.

  • Enter URL http://localhost:8080/h2-console in the browser.

Login Connect/Test Connection

  • Enter the JDBC URL and connect to see the Camunda Database where all the tables can be seen.

Camunda Database Tables

  • Have a quick look at a few important tables.
    • To check deployment: select * from ACT_RE_DEPLOYMENT
    • To check running process: select * from ACT_RE_PROCDEF
    • To check running task: select * from ACT_RU_TASK

5. Go to Tasklist and click on the claim and complete the task. Refresh the Cockpit and you can see the running process is completed.

6. Further, check out the below tables to see the history of the executed process and task where all the running tasks and processes are completed and having updated END_TIME_.

  • To check the completed process: SELECT * FROM ACT_HI_PROCINST
  • To check the completed task: select * from ACT_HI_TASKINST

So, we are able to run the Camunda process using Spring Boot. Further, all Spring Framework lovers can modify the process as per your needs.

Feel free to ask questions.

Spring Framework Camunda Spring Boot application Engine

Opinions expressed by DZone contributors are their own.

Related

  • External Task Client Implementation in Camunda With Spring Boot Application
  • A Practical Guide to Creating a Spring Modulith Project
  • Creating Application using Spring Roo and Deploying on Google App Engine
  • Distributed Tracing System (Spring Cloud Sleuth + OpenZipkin)

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!