[jboss-user] [jBPM] - Re: jBPM 5.4 : forwarding task PermissionDeniedException when user is actualOwner but not in potential owners

gonzalad do-not-reply at jboss.com
Tue Feb 19 09:37:01 EST 2013


gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

"Re: jBPM 5.4 : forwarding task PermissionDeniedException when user is actualOwner but not in potential owners"

To view the discussion, visit: https://community.jboss.org/message/798355#798355

--------------------------------------------------------------
For now, I'm adding actualOwner to potentialOwner as a temporary solution just before calling forward.


// add actualOwner to potentialOwners
Task task = taskService.getTask(taskId);
org.jbpm.task.User actualOwner = task.getTaskData().getActualOwner();
if (actualOwner != null) {
  PeopleAssignments peopleAssignments = task.getPeopleAssignments();
  if (! peopleAssignments.getPotentialOwners().contains(actualOwner)) {
    peopleAssignments.getPotentialOwners().add(actualOwner);
  }
}
 
taskService.forward(taskSummary.getId(), username, targetGroupname);
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798355#798355]

Start a new discussion in jBPM at Community
[https://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/20130219/ddeec01c/attachment.html 


More information about the jboss-user mailing list