Yes, you will need to put code in under the Transitions tab for the transition that will send it on.
Here is sample code. You will need to change it for your specific role in the workflow. It will put up a box telling the user that there is no one in the role.
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("specify_role_here")) {
java.util.ArrayList users = (java.util.ArrayList) members.get(role);
//If there is no user in specify_role_here role throw exception
if (users.isEmpty()) {
throw new Exception("Select user for " + role.getDisplay());
}
}
}