We are using multiple camunda process developed using camunda 7.x which are headless (i.e) UI is in angular and backend is taken care by Springboot. Now we want to migrate to camunda 8 but there is no option to handle task listeners and execution listeners which we have used extensively in our project. Below is a use case,
As soon as a process is initiated, we have to insert a record in db with other necessary information. we use execution listeners for this.
once the process is completed, we have to update the process status in app db to completed. again execution listeners are used.
When each task is created, task listener (create) is invoking a java delegate which helps to insert task level information in app db and display the angular ui to users.
Similary when a task is completed, task listener (complete) is used to update the app task status to hide the ui from user and update other information related to tasks.
Now we are in a critical situation, where are not able to proceed further. Can anyone provide a solution for the existing approach?
in general, the problem you are facing could be handled by a custom exporter in zeebe. More information here: Exporters | Camunda Platform 8 Docs
However, this is only possible in Self-Managed at the moment.
When using Saas, there are some things you can do to solve the other problems as well:
Instantiate the process instance and use the returned event to save the process instance information in your domain db
Use a message end event and update your domain db in the job implementing the event.
Each task is a job in zeebe, also user tasks. They have a special task type. On user task job activation, you can update your domain db. More information here: User tasks | Camunda Platform 8 Docs
Similar to creating a process instance, you could follow up on a task completion and update your domain db accordingly.
Exactly @fml2 . We are delaying the process of migration until we have a solid solution. so far camunda 7 serves the purpose hope it wont be decommissioned or deprecated in near future.
you can serve your requests with small dedicated changes/extensions and reuse your listener code logic:
You can add an intermediate message throw event after the start to inform your external system that a new process is started. Implement the event with a new task type, using the code from the listener.
Same as the last topic. Use a message end event and move your code from the listener into the job worker. Or insert an intermediate message throw event before the end event. It’s a matter, which state the end event describes.
You can use your own worker for user tasks and put your listener code here. All user tasks are available under the topic io.camunda.zeebe:userTask.
Same as above. Completing the task should go to the worker to complete the task in Zeebe and you can reuse your listener code here.
Thanks @Ingo_Richtsmeier . I will do a POC with the design you have mentioned. This really helps and I am hopeful this will serve as a solution. Thanks once again.