cancel
Showing results for 
Search instead for 
Did you mean: 

How to complete the task by some other user than the person who claimed the task

hemamalini
Champ in-the-making
Champ in-the-making
In the process instance , for a user task, suppose a person in the candidate group for that task has claimed a task but didnt complete the task. Is it possible to take that task from that person's queue and delegate it to some other by other user like admin without changing the database. If a person has claimed a task no other person can complete the task. Please correct if my understanding is wrong. Is it possible to configure admin for a form?
2 REPLIES 2

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Hema,

Is it possible to take that task from that person's queue…
yes,

  /**
   * Changes the assignee of the given task to the given userId.
   * No check is done whether the user is known by the identity component.
   * @param taskId id of the task, cannot be null.
   * @param userId id of the user to use as assignee.
   * @throws ActivitiObjectNotFoundException when the task or user doesn't exist.
   */
  void setAssignee(String taskId, String userId);

If a person has claimed a task no other person can complete the task.
No, anybody who can call complete method can complete the task. (It depends on your application who is authorized to call the API.

  /**
   * Called when the task is successfully executed.
   * @param taskId the id of the task to complete, cannot be null.
   * @throws ActivitiObjectNotFoundException when no task exists with the given id.
   * @throws ActivitiException when this task is {@link DelegationState#PENDING} delegation.
   */
  void complete(String taskId);

configuration depends on your app.

Regards
Martin

hemamalini
Champ in-the-making
Champ in-the-making
Thanks a lot ..