Is there a easy way to check if a user can claim a particular task. Right now, I am getting all the tasks that the user can potentially own and checking if the task that I am looking for is present.
{code}
taskIdToCheck = somtaskId;
List<TaskSummary> userTaskList = taskService.getTasksAssignedAsPotentialOwner(userId, "en-UK");
for(TaskSummary taskSummary : userTaskList){
if(taskIdToCheck == (new Long(taskId).longValue())){
// task is claimable
break;
}
}
{code}