Calling a task from an external process

Hi Guys

We currently have a process that gets initiated from an external system which works fine, then in camunda we need to send an Id from an execution listener where we are calling a REST API to another system because that system has it’s own process when it completes it needs come back to camunda and execute a human task so that the process completes. I have looked at the examples and I do not know how to get the taskid from java…we are using a javadelegate. Your help would be appreciated.



when using a Java Delegate for executing service tasks or execution listeners, you have access to the delegateExecution.
To get the ID of the current task, simply call delegateExecution.getActivityInstanceId().

If you’re using a TaskListener, you have a delegate Task and you may call delegateTask.getId().