cancel
Showing results for 
Search instead for 
Did you mean: 

Complete User Task via REST API

bonovox
Champ in-the-making
Champ in-the-making
When I use my embeded activiti and run it as a JUnit test im able to complete user task like this


Map<String,Object> userTaskVariableMap = new HashMap<String,Object>();
userTaskVariableMap.put("visa", "Y");
taskService.complete(task.getId(), userTaskVariableMap, false);


How can I complete task with the variable using REST API ?

I tried to put user variable in PUT json body, but it wont work:
PUT http://localhost:8081/activiti-app/api/enterprise/tasks/1023/action/complete
2 REPLIES 2

mitpatoliya
Star Collaborator
Star Collaborator
You need to use core activiti REST API for that. Activiti Enterprise APIs does not cover all feature right now.

POST runtime/tasks/{taskId}

Complete a task - Body JSON:
{
  "action" : "complete",
  "variables" : []
}

bonovox
Champ in-the-making
Champ in-the-making
Thank you, great help!