Completing a User task with Java API


Is it possible and how to complete a user task with the Java API?
I have the task_id.


1 Like

In REST API, you can use this method:
you should find a similar one in Java API

Yes, I know this REST API call @zmadel, thanks!
But Iā€™m looking about a JAVA API alternative.

Get the task service
Using the process engine
Complete with ID

processEngine().getTaskService() .complete("someTaskIdHere");


can we do that via scripting from within the process?

Did you find a solution for this?

I figured out the solution

pi = execution.getProcessInstanceId()
taskService = execution.getProcessEngineServices().getTaskService()
task = taskService.createTaskQuery().processInstanceId(pi).taskDefinitionKey("IssueCvr").singleResult()
1 Like