JBoss Community

Group Assignment

created by roxy1987 in jBPM - View the full discussion

Hi,

 

I tried assigning task to a group. EVerything is good except a couple of issues i am having.

 

a) When we retrieve a taskSummary object for a group task, we can get to know its userid provided it is not a group task but in case it is a group task, how do we get its group ID? Since a user might be part of various groups, so it becomes important to know to which group the task was assigned.

 

b) Secondly, I am able to retrieve the task but when I try to claim it, I get the following permission exception :

 

 

 org.jbpm.task.service.PermissionDeniedException: User '[User:'mary']' does not have permissions to execution operation 'Claim' on task id 1
 
 public static void claimTask(long taskId, String userId)
{
 connect();
 BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();
 try
 {
 // client.release(taskId, "Administrator", responseHandler); 
  client.claim(taskId, userId, responseHandler);
  responseHandler.waitTillDone(5000);
 }
 catch(Exception e)
 {
  CustomExceptionHandler.handleException(e);
 }
}
 

The code looks like above. I tried to release it from Administrator's queue too. but it did not work may be coz the task is in ready state until it is claimed.

 

Regards.

Reply to this message by going to Community

Start a new discussion in jBPM at Community