It there a way for non-javaer to call external rest api in every assignment of user task activity?


I need to notify another system when it goes to next step, include activity name, business id, and notify assignee by email. Both above can be solved by an api call to the other system.

I know there are already solution for notification in every step, it’s here How to send email notification to users after task completion - #2 by kedarik, but if I do not write java, it seems very hard to seek any clue of doing this simply.

I can provide a rest api for bpmn file to call, but I have to add a service and set connector before every activity for every user task. Can I custom an user task activity with connector feature? Or any java class\method in the system already satisfy it?
Thank you!

You’re right, you need to use Java to customise TaskListeners: dooghi Using TaskListener in remote engine model

If you use a parse listener to add some bahaviour to each and every task, as thorben poitns out in the post you linked to, you can definitely customise the invocation, based on - for instance - custom properties defined on the model for the task. In the parse listener, you have access to the model objects parsed, so you can use that context to customise the connector or listener that you’re using to invoke the remote service that needs to know about the process’ events.

Or you can turn it around to a “pull” model. Instead of Camunda calling out to your application, have the application reach into Camunda.
What we are pursuing at the moment is a little piece of java that does what Tiese explains. It gets attached to all human tasks through a parse listener.
What we’ve decided to do though is to have a utility process deployed (BPMN) that has a single external task. Our task listener code simply starts an instance of that utility passing in some variables (the process instance ID, the task ID). This way, an external task gets created for every human task that gets started. Then in our external application, we use the External task pattern (and since we’re in C#, we’re working with this opensource project at the moment), pulling the notification that a task has started from the external task topic queue. With the two IDs, we can reach back into Camunda into the process or human task to get what ever information we need.
This keeps Camunda very decoupled from the application.