Camunda: Tasklist Plugin
How to use a plugin to add your own functionality.
What is Camunda?
Camunda BPM is an open-source workflow and decision automation platform. Camunda BPM ships with tools for creating workflow and decision models, operating deployed models in production, and allowing users to execute workflow tasks assigned to them.
It provides a Business Process Model and Notation (BPMN) standard compliant workflow engine and a Decision Model and Notation (DMN) standard compliant decision engine, which can be embedded in Java applications and with other languages via REST.
In this blog, we are concerned with the using the plugin feature to extend the Tasklist web application. I will demonstrate how I was able to create and integrate a plugin into my Camunda Tasklist
The Problem
Personally, I found that the Camunda docs , are not very clear on how the structure of the plugin and where to integrate it into your Camunda web application.
Getting Started
The configuration will be ordered as follows:
- Clone an existing sample plugin project
- Make modifications or add code
- Integrate
Clone an existing plugin project
As mentioned , I found the Camunda docs very un-helpful. Consequently, I decided to find existing plugins to better understand what is needed. Luckily, I stumbled upon a sample project called tasklist-plugin-easy-search.
I cloned this project and used it as a base.
Make modifications or add code
Within your newly cloned project , make sure that the class name in /code-master/snippets/tasklist-plugin-easy-search/src/main/java/com/camunda/demo/plugin/tasklist/search/easy/EasySearchPlugin
is referenced in a file called org.camunda.bpm.tasklist.plugin.spi.TasklistPlugin
that resides in the directory META-INF/services
.
Placement of the plugin : Plugin Points
There are a limited number of locations on the Tasklist webpage whereby you can place your plugin. Please have a look here.
Once selected you can change the code in /code-master/snippets/tasklist-plugin-easy-search/src/main/resources/plugin-webapp/easy-search-plugin/app/plugin.js
var Configuration = ['ViewsProvider', function (ViewsProvider) {
ViewsProvider.registerDefaultView('tasklist.navbar.action', {
id: 'claim-interface-plugin',
label: 'Search',
url: 'plugin://claim-interface-plugin/static/app/claim-interface-plugin.html',
controller: Controller,
priority: 1000
});
}];
Integrate
Finally, to integrate this plugin into you Camunda web app, you should create a Jar file. Next, shut down your Camunda web app if it is running.
Thereafter, go into your Camunda web app directory and place the Jar in /server/apache-tomcat-8.0.24/webapps/camunda/WEB-INF/lib/.
Start up your Camunda web app.
Thank you for reading! Feel free to make any other suggestions or recommendations for future challenges. Leave a few claps if you enjoyed it !