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