I’m using camunda bpm version 7.10. I want to use external task api to send emails when executing “claim” and “unclaim” api in Camunda. According to our requirement our Camunda engine working separately. so every Camunda action we calling using REST API.
Right now I used Task Listeners for sending emails.Problem here is code base is in the engine itself. But If we take engine separately I can’t write Listener code in the engine. That’s why I want to use External Task to do that.
Can anybody help me to do this.
You could implement a task listener that just sets a variable. That could be done by using Script. Then you can include an event sub process into your process. Everytime the variable turns true the event subprocess is triggered. (You need to make sure to set it false again then) Inside the event subprocess you can then use a service task which contains the logic of the Listener. This can be then again an external task.
This forum post follows a similar approach: Can we execute external task on task lifecycle events