List refs = null;
try {
refs = delegator.findByAnd(org.ofbiz.shark.SharkConstants.WfRepositoryRef, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.refXpdlId, referredXPDLId));
} catch (GenericEntityException e) {
throw new RepositoryException(e);
}
if (!UtilValidate.isEmpty(refs)) {
Iterator i = refs.iterator();
while (i.hasNext()) {
GenericValue v = (GenericValue) i.next();