} else if (type.isHuman()) {
String crit = (String)participant.getResourceSelection();
if (crit != null && crit.startsWith ("!:currentUser")
&& principal != null) {
try {
WfResource res = asResource (principal);
assigned.add (res);
addAssignment (finderId(finder), actId, res);
return assigned;
} catch (AlreadyAssignedException rnf) {
return assigned;
} catch (InvalidKeyException rnf) {
return assigned;
}
}
resSel = "M:" + participant.getName();
}
// fall through
try {
Collection reses = rms.selectResources (resSel);
if (reses.size() == 0) {
return assigned;
}
long finderId = finderId (finder);
for (Iterator i = reses.iterator(); i.hasNext();) {
WfResource res = (WfResource)i.next();
assigned.add (res);
addAssignment (finderId, actId, res);
}
return assigned;
} catch (AlreadyAssignedException rnf) {