Using “a” history plugin with spring-boot and camunda platform 7 community edition

Jan Galinski
Holisticon Consultants
3 min readNov 4, 2022

TL;DR: If you just want to see it running, scroll down to Installation in camunda spring boot.

I assume that if you read this, you are familiar with the camunda platform 7 spring boot solution. And maybe you are running the community (aka FOSS) edition of this wonderful process engine.
Could be because you are just exploring for a pet project, you are still evaluating and have not yet switched to the enterprise edition (which I would still recommend for production usage) or are brave and run your production environment without enterprise support …
Either way, one thing you might possibly be missing is the history plugin. Once your process instance finished it is no longer visible in the camunda cockpit and you have to use the REST or Java API of the history-service to find out what exactly happened during execution.

I recently learned about a community cockpit plugin while chatting at this years CamundaCon in Berlin and finally got the time to explore it.

screencast made by datakurre (https://github.com/datakurre/camunda-cockpit-plugins/)

Open source “history plugin” for Camunda Cockpit

The plugin has been created by Camunda Champion Asko Soukka (aka datakurre) and is available on his github repository. Thanks to the “new“ camunda cockpit system (introduced with camunda 7.14), it just consists of four *.js files that you have to provide to your camunda (spring-boot) application.

I grew up in a time when installing a custom plugin required downloading and unzipping the camunda-webapp war file, modifying its content, repackage it in the correct way and deploy it to a mysterious software component called the JBoss application server. So I was really impressed how easy this has become. Kudos to the camunda team.

Asko did a great job of documenting the plugin features (and how it is not supposed to replace the enterprise plugin nor claims to make an EE subscription obsolete) in his blog post and the github readme.
But using spring boot, I was missing some concrete hints how to install and use it in my camunda CE project. Luckily, he forwards to a camunda forum discussion where this problem has been solved.

Installation in camunda spring boot

To safe you some time, I will document my learnings here. It is really simple:

  1. Create a spring boot application and use the camunda spring boot starter.
  2. create a the directory `./src/main/resources/META-INF/resources/webjars/camunda/app/cockpit/scripts`
  3. Clone the repository or just download the files mentioned in his docs
  4. copy those files to the scripts repository
  5. run your application

Once you are done, it should look like this:

src/main/resources/
├── META-INF
│ ├── resources
│ │ └── webjars
│ │ └── camunda
│ │ └── app
│ │ └── cockpit
│ │ └── scripts
│ │ ├── config.js
│ │ ├── definition-historic-activities.js
│ │ ├── instance-historic-activities.js
│ │ ├── instance-route-history.js
│ │ └── robot-module.js

Now go to the process instance view of the cockpit and you can switch to the history tab and explore the activites and process variables of your completed instances that otherwise would not be available in the CE cockpit anymore. Nice work!

--

--

Jan Galinski
Holisticon Consultants

I am a Senior Consultant/Software Engineer at Holisticon AG, based in Hamburg, Germany, focussing on event-driven microservices and process automation.