cancel
Showing results for 
Search instead for 
Did you mean: 

How to Reassign a userTask

skverma02
Confirmed Champ
Confirmed Champ

how to reassign a userTask?

lets assume a userTask is assign to user X and i want to assign this usertask to assign to user y.

i am using that query to assign a task

{"action":"claim","assignee":"userId"}

http://localhost:8080/activiti-rest/service/runtime/tasks/taskId

what is the query to reassign a userTask?

1 ACCEPTED ANSWER

daisuke-yoshimo
Star Collaborator
Star Collaborator

You must call the two REST APIs in order.

1. unclaim

POST runtime/tasks/%taskId%

{
"action": "claim",
"assignee": null
}

2. claim

POST runtime/tasks/%taskId%

{
"action": "claim",
"assignee": %userId%
}

Reference

15.7.5. Task actions

Activiti User Guide 

View answer in original post

2 REPLIES 2

daisuke-yoshimo
Star Collaborator
Star Collaborator

You must call the two REST APIs in order.

1. unclaim

POST runtime/tasks/%taskId%

{
"action": "claim",
"assignee": null
}

2. claim

POST runtime/tasks/%taskId%

{
"action": "claim",
"assignee": %userId%
}

Reference

15.7.5. Task actions

Activiti User Guide 

skverma02
Confirmed Champ
Confirmed Champ

thank you    
yes you are right Smiley Happy  its work.