3 Replies Latest reply: Sep 26, 2013 10:12 AM by 868989 RSS

    updateTaskOutcome() get "Insufficient privileges to access task..."

    885980
      When i call updateTaskOutcome() in BPM 11g i get error
      "ORABPEL-30513 (BPM-30513) Insufficient privileges to access the task information for this task.
      User dafd3bd1-148f-488d-8ddb-7384d4155a00 cannot access the task information for task: {1}.
      Ensure that the user has been granted appropriate privileges to access the task information for this task."

      //Create JAVA WorflowServiceClient
      IWorkflowServiceClient wfClient = bpmServiceCF.getWorkflowServiceClient();
                
      //Get the task query service
      ITaskQueryService querySvc = wfClient.getTaskQueryService();
           
      // WorkflowContext
      IWorkflowContext ctx = querySvc.authenticate("jcooper","12345678".toCharArray(),null);

      List queryColumns = new ArrayList();
                queryColumns.add("TASKID");
      queryColumns.add("TASKNUMBER");
      queryColumns.add("TITLE");
      queryColumns.add("OUTCOME");
                
      //Query a list of tasks assigned to jcooper
      List tasks = querySvc.queryTasks(ctx,
                                              queryColumns,
                                              //null, //Do not query additional info
                                              null,
                                              ITaskQueryService.AssignmentFilter.MY_AND_GROUP,
                                              null, //No keywords
                                              //null, //No custom predicate
                                              null,
                                              null, //No special ordering
                                              0, //Do not page the query result
                                              0);

      ITaskService taskService = wfClient.getTaskService();
      Task task = (Task)tasks.get(16); // we get task, assigned to jcooper

      Task taskDet = querySvc.getTaskDetailsById(ctx, task.getSystemAttributes().getTaskId());

      taskService.updateTaskOutcome(ctx, taskDet, "SUBMIT");


      strange error, task is assigned to jcooper, but "SUBMIT" can't set... Have anybody ideas?
        • 1. Re: updateTaskOutcome() get "Insufficient privileges to access task..."
          user335369 - oracle
          Hi,

          Have you found any solution for your issue, as I am also facing the same error when I perform Task search.

          User john cannot access the task information for task: 23f496a5-c272-4ebb-89db-378430a6c1b7.
          Ensure that the user has been granted appropriate privileges to access the task information for this task.
          ORABPEL-30513

          Insufficient privileges to access the task information for this task.
          User john cannot access the task information for task: 23f496a5-c272-4ebb-89db-378430a6c1b7.
          Ensure that the user has been granted appropriate privileges to access the task information for this task.

               at oracle.bpel.services.workflow.query.impl.TaskQueryService.getTaskDetailsById(TaskQueryService.java:1723)
               at sun.reflect.GeneratedMethodAccessor4739.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)

          Regards,
          • 2. Re: updateTaskOutcome() get "Insufficient privileges to access task..."
            885980
            Yes, i found solution:
            instead of
            taskService.updateTaskOutcome(ctx, taskDet, "SUBMIT");
            use
            taskService.updateTaskOutcome(ctx, taskDet.getSystemAttributes().getTaskId(), "SUBMIT");
            • 3. Re: updateTaskOutcome() get "Insufficient privileges to access task..."
              868989

              Hi,

              I am also getting the same error when trying to set the payload programmatically. I followed the above approach but still getting the error. Can anyone throw some ideas?

               

              Thanks.