I have been using Camunda 7 in embedded mode. As part of this, I have used the Spring Boot SPEL Event Listeners to pick up events from Camunda and use them to perform operations on my business data. For example, user completes Task A, process goes to Message Intermediate Catch Event B. I then have a Spring Listener that listens to the CREATE event for B, and set a status in my application data to ‘Awaiting Update’.
Now I want to move to a more microservice approach, where Camunda 7 is a standalone MS. I have seen external tasks and understand how they work, so know how to do some remote service invocations. I was wondering if there is something similar to external tasks that can listen to the events described above. For now, I feel that I would need to modify my process to have an external task to update my app DB status BEFORE Message Intermediate Catch Event B, which seems a bit inefficient.
Any way to model / handle this more gracefully without explicitly modelling it?
Edit1: Another alternative is to pump out all Camunda events on a message bus like Kafka. Keen to avoid complicating the design.
Edit2: This also means I will have to have an external task before each user task, as the application status is based on the Task
Edit3: We also have a composite service that combines taskId with business data for queues. Plan above wont allow for the task id to be passed, as its before the task is generated…
Out of curiousity: what advatages in development or operations do you expect from this change? Why do you think you current solution is “worse” than what you want to implement?
The above question is mostly how to design an application in Camunda 7 that will be ported to Camunda 8 easily. We have a new greenfield app coming up which by necessity will be in Camunda 7, but should be easily migrated to Camunda 8 when the time comes.
Our existing applications use the Spring Listener patterns extensively to synchronise app data with process data (like task) and I dont see how to achieve similar functionality in Camunda 8.
Hah, so, the situation is basically like this: we are satisfied with our application design but since Camunda is holding a pistol at our breast we have to find a way out… I’m sorry for the black humor, it’s not funny at all.
Maybe I can use this as a Call Activity each time a human task is created. The external task will call the target MS, which will then have to call the Camunda Rest API to retrieve the Task ID and synchronise the data.
There has to be a better way…
Edit1: Conditional Boundary Event is probably better.
Would it not make sense to write your own C8 exporter that listens to all the events that happen in the Camunda system, and then updates the app db (similar to what Operate Exporter does)
One constraint here…
C8 Exporters are C8 ONLY.
You cannot use them with a C7 system. So in terms of “steping stones” to move from C7 to C8, it might not be the right place to invest your effort. It just seems closer to the C7 eventing bus that you are using today.
Having spoken to Camunda, it seems the C8 Exporters will most likely do the job, and is real-time. It also will only work on self hosted solutions. Not a great solution, but its all we got.