[jboss-user] [jBPM] - org.jbpm.task.service.PermissionDeniedException in JBPM 5.1

alain1106 do-not-reply at jboss.com
Sat Oct 29 12:40:29 EDT 2011


alain1106 [http://community.jboss.org/people/alain1106] created the discussion

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

To view the discussion, visit: http://community.jboss.org/message/634129#634129

--------------------------------------------------------------
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
[http://community.jboss.org/message/634129#634129]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111029/14a5652e/attachment.html 


More information about the jboss-user mailing list