3 Replies Latest reply on Sep 26, 2012 2:21 PM by Roberto Vanderlei

    org.jbpm.task.service.PermissionDeniedException in JBPM 5.1

    alain1106 Newbie



      I can't seem to be able to claim/start a task , getting the following error :

      org.jbpm.task.service.PermissionDeniedException: Server-side Exception: User '[User:'john']' does not have permissions to execution operation 'Claim' on task id 3


      I am using the demo setup of JBPM 5.1, launching through the jbpm-installer provided with the install package. I am using the user "john" and group "PM" provided in the mvel files that come with the demo setup.


      The error occurs when claiming the task , with the following code :



              TaskClient client = new TaskClient(new MinaTaskClientConnector("client 1", new MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));

              client.connect("", 9123);



              // getting potential tasks for user "john"

              List<String> groupsJohn = new ArrayList<String>();



              //display tasks

              BlockingTaskSummaryResponseHandler taskSummaryResponseHandler = new BlockingTaskSummaryResponseHandler();

              client.getTasksAssignedAsPotentialOwner(null,groupsJohn, "en-UK", taskSummaryResponseHandler);

              List<TaskSummary> myTasks = taskSummaryResponseHandler.getResults();



              //Claim task for John & start it

              BlockingTaskOperationResponseHandler taskOperationResponseHandler = new BlockingTaskOperationResponseHandler();

              client.claim(3, "john", taskOperationResponseHandler  );




              }catch (Throwable t) {




      I have checked the following already :

      - Task status for Task id 3  is "Ready", no actor assigned yet.

      - Group and actor names are correctly defined in the mvel files.

      - The Human Task node in my flow has the Group "PM" defined in its group property, and the actor id is left empty.

      - If i assign actor "john" to the human task in the bpmn flow , I can start the task correctly

      - I can start the task using Administrator.

      - getTasksAssignedAsPotentialOwner("John",groupsJohn, "en-UK", taskSummaryResponseHandler)gives the same error as the line above



      So it really has to do with the group , but I can't figure out why ...