How to install plugin into Camunda Cockpit when using Spring Boot?
gimmebytes opened this issue ยท 3 comments
Hi @datakurre ๐ ,
I'm currently creating a Camunda PoC leveraging the Spring Boot Starter. I stumbled over your blog post describing your work on this plugin. I would love to try it out, but I'm not very familiar with the plugin system of the Camunda Cockpit.
Could you guide me into the right direction on how to install the plugin into my PoC application using Spring Boot?
I started my PoC using the camunda Initializr , so beside a different process model and custom task code, nothing is different from the defaults.
Cheers,
Marvin
PS: Java version is 11 and Camunda Platform is 7.15.0
I have config.js
resources in my app at
./src/main/resources/META-INF/resources/webjars/camunda/app/cockpit/scripts/config.js
and bundles at
./src/main/resources/META-INF/resources/webjars/camunda/app/cockpit/custom
referred in config.js as custom/bundlename.js
.
But there could be more examples at the forum https://forum.camunda.org/t/minimal-cockpit-history-plugins-for-camunda-7-14-0/24651
While at first your hint didn't work out, I tried out to integrate a very basic plugin from the Camunda examples (btw. everybody should have the cats plugin installed).
So that helped to get everything up and running correctly.
I did the following:
$ cd <to my src folder>
$ mkdir -p main/resources/META-INF/resources/webjars/camunda/app/cockpit
$ mkdir -p main/resources/META-INF/resources/webjars/camunda/app/cockpit/scripts
$ cp <path to your git repo>/config.js <src>/main/resources/META-INF/resources/webjars/camunda/app/cockpit/scripts
$ cp <path to your git repo>/*.js <src>/main/resources/META-INF/resources/webjars/camunda/app/cockpit/
The trick was to have config.js in the script folder one folder below the cockpit folder and having your plugins in the cockpit folder.
Then I restarted the app in IntelliJ and hit F5 and your plugins appeared!
Thanks!