JBoss Community

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

created by alain1106 in jBPM - View the full discussion

Hello

 

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 :

 

        try{

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

        client.connect("127.0.0.1", 9123);

        Thread.sleep(1000);

       

        // getting potential tasks for user "john"

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

        groupsJohn.add("PM");

       

        //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  );

        taskOperationResponseHandler.waitTillDone(1000);

           

       

        }catch (Throwable t) {

            t.printStackTrace();

    }

 

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 ...

Reply to this message by going to Community

Start a new discussion in jBPM at Community