Causing exception "OOPS! Task null is already claimed by someone else" while claiming a task


#1

Hi All,

I am seeing the exception “OOPS! Task null is already claimed by someone else”. Even though the task is assigned to me only.I verified this from cockpit and task list.

I unclaimed the task from task list , made the assignee variable empty and tried to open the task again but still getting same error.

I re-triggered the task but it did not help.

Please advise.


#2

This exception is thrown when you try to claim a task that is already claimed by someone else. You can claim only unassigned task.

public TaskAlreadyClaimedException(String taskId, String taskAssignee) {
        super("Task '" + taskId + "' is already claimed by someone else.");
        this.taskId = taskId;
        this.taskAssignee = taskAssignee;
    }

In your case, the taskId is null. “OOPS! Task null is already claimed by someone else”.

It should be like “OOPS! Task <taskId> is already claimed by someone else”.

Also check whether the task exists or not.


#3

I unclaimed the task from Task-list and Cockpit and then I claim it again but it still gives same error.


#4

In console what error message you got?


#5

Console is clean also,I am able to find the corresponding task id in “ACT_RU_TASK” table.Looks like it is querying a different task which has id = null and assignee = null


#6

What about server log?


#7

I examined Camunda logs but it does not show any error.


#8

While claiming the task, check response headers in Network tab of browser of claim task rest api calls to camunda.