Reassign a task

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member II

Reassign a task

Jump to solution

can we reassign a task to someone else user?

lets assume a task is assign to "user A" and we want to assign this task to "user B"  

I am using query to assign a task to "user A " is 

query is

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

and rest url is 

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

how can assign this task to user B?

1 Solution

Accepted Solutions
Highlighted
Alfresco Employee

Re: Reassign a task

Jump to solution

A task can be updated using the following endpoint Activiti User Guide. This includes updating the assignee

POST /runtime/tasks/{taskId}

{

"assignee": "userIdB"

}

View solution in original post

8 Replies
Highlighted
Active Member II

Re: Reassign a task

Jump to solution

we 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 

Highlighted
Alfresco Employee

Re: Reassign a task

Jump to solution

A task can be updated using the following endpoint Activiti User Guide. This includes updating the assignee

POST /runtime/tasks/{taskId}

{

"assignee": "userIdB"

}

View solution in original post

Highlighted
Active Member II

Re: Reassign a task

Jump to solution

‌ 

yes you are right .
but it is not post it is put.

thank you Smiley Happy

Highlighted
Member II

Re: Reassign a task

Jump to solution

Thanks for the solution.

As a follow-up question, what would you do if the original assignee (User A) was the process initiator, in which the subsequent tasks may be assigned to this person? What should I do to assign all future tasks that belong to User A to User B?

Highlighted
Active Member

Re: Reassign a task

Jump to solution

can we assign a task to another user?
let's assume that a task is assigned to "user A" and we want to assign this task to "user B", but I want "user A" to remain in the stream and not be replaced

Highlighted
Senior Member

Re: Reassign a task

Jump to solution

you'll have to assign both of them as candidate users, that way, any one of the user can claim the task and work on it. task will remain in the pool till its claimed by any user.

Regards,
Abbas
Highlighted
Active Member

Re: Reassign a task

Jump to solution

Thank's for your time. I am new to this world. Please could you show an example of what it would look like in step by step please.
greetings

Hernanis

Highlighted
Senior Member

Re: Reassign a task

Jump to solution

Read more about task assignment here - https://www.activiti.org/userguide/#bpmnUserTaskAssignment

Regards,
Abbas