JBoss Community

How to check if a user can claim a task

created by Ashok Kuppuswamy in jBPM - View the full discussion

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}

Reply to this message by going to Community

Start a new discussion in jBPM at Community