I would like Camunda to notify an external service via REST every time a task changes hands. The rest of this post is based on the assumption that this functionality is not baked in and that I’ll have to write a custom task listener, but if I’m mistaken please tell me as I will be very glad to sidestep the extra effort
Assuming I need to write a custom task listener, I have found the code examples here (email example) and here (parse listener example) but both examples seem to assume you’re building the distribution yourself with Maven.
Our current Camunda deployment uses the BPM Run Docker image. Inspecting the contents of the Docker it seems that all I have are pre-built JARs (
camunda-bpm-spring-boot-starter-rest-<version>.jar, etc) and the two configuration files
production.yml; AFAICT I do not have access to
camunda.cfg.xml as mentioned here.
I have no experience with Spring Boot and it’s not clear to me how to wire everything together. Can someone walk me through the build and deploy process? I’m assuming the workflow is something like:
- Yank the JAR out of the BPM Run Docker to compile against.
- Write a simple event listener and package it into its own JAR.
- Poke the JAR into the Docker and edit
/camunda/start.shto add my JAR to the classpath.
- Use some configuration somewhere to tell Camunda to load my custom listener.
Is writing the event listener as simple as I stated in #1 or are there gotchas I need to be aware of?
Once I have a JAR containing my listener, how do I tell Camunda that it exists? Does that get added in the
.yml configuration files or do I need to add configuration to my JAR? If so, where and how?