Good night @haideralishaik
I made the update as you say, but I still have the null pointerexception in the run time , I did another idea, but is the same issue, I know the reason is not working due to the ce is a null value, but when I run I dont know why doesn’t enter on the next instruction “certificationentity is null“ or the instruction “the certification has not items“
CertificationEntity ce = (CertificationEntity)entity;
List<CertificationItem> items = ce.getItems();
if(items == null || items.isEmpty()) {
customLog.debug("the certification has not items");
}else {
if(ce != null) {
Object owner = ce.getOwner();
if(owner instanceof Identity) {
duenoActual = (Identity)owner;
List<Identity> userGroup = duenoActual.getWorkgroups();
if(userGroup !=null) {
for(Identity wg : userGroup) {
if(executiveWorkGroup.equals(wg.getName())) {
bandera = true;
break;
}
}
}
Identity baIdentity = context.getObjectByName(Identity.class,baWorkGroup);
if(bandera && baIdentity != null) {
customLog.debug("El certificador "+duenoActual.getName()+
"es miembro de "+executiveWorkGroup+"delegado a: "+baWorkGroup);
resultado.put("recipientName",baIdentity);
resultado.put("reassign",Boolean.TRUE);
} else {
customLog.debug("El cerificador "+duenoActual.getName()+
" no pertenece al workgroup: "+executiveWorkGroup);
}
}else {
customLog.debug("Owner is not a identity "+ owner.getClass().getName());
}
} else {
customLog.debug("CertificationEntity is null");
}
}
return resultado;