Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
A few of my co-workers keep getting the error "IgnoreUnresolvedRole Notification" message email whenever they receive a task that needs to be completed or a review that needs to be done. Does anyone know how I would be able to fix this problem?
This usually happens because people forget to go in and assign roles to users. At least that is the only time I have ever seen that email or error.
If it doesn't matter if everyone in a role gets the task, then you can go into the Teams and set a group to a role. If you only want one person to receive the task and it is a SetUp Participants part of the task sign off, then you can put code into the Transitions tab of the workflow task being performed. This will not allow the user to complete the task until they have put someone in the required role.
Let's say that you create a Transition of MGR Approval that is assigned by the role MGR_Approval. You would go to the Transitions tab and select MGR Approval under Transition on the left side. Then under the Optional Condition For Transition, on the right side, you would put the following code:
wt.workflow.work.WfAssignedActivity act = (wt.workflow.work.WfAssignedActivity) self.getObject();
wt.workflow.engine.WfProcess pro = (wt.workflow.engine.WfProcess) act.getParentProcess();
wt.team.Team t = wt.team.TeamHelper.service.getTeam(pro);
java.util.Map members = t.getRolePrincipalMap();
java.util.Set keys = members.keySet();
java.util.Iterator itr = keys.iterator();
while (itr.hasNext()) {
wt.project.Role role = (wt.project.Role) itr.next();
System.out.println("Role-=-=-=" + role);
if (role.toString().equalsIgnoreCase("MGR_Approval")) {
java.util.ArrayList users = (java.util.ArrayList) members.get(role);
//If there is no user in MGR_Approval role throw exception
if (users.isEmpty()) {
throw new Exception("Select user for " + role.getDisplay());
}
}
}