Deleting a user/group in your ldap will have the effect of leaving 'orphaned SIDs' in the security of objects in place of the user/group's access control entries.
It's better to disable the user in ldap, so the CPE can still resolve the user. If that is not possible, you would then probably need to clean up the SID values in those objects.
The knowledge center has a topic on this: https://www.ibm.com/docs/en/filenet-p8-platform/5.5.x?topic=solutions-removing-invalid-security-ids
and here is a bit more generic version of the script, so you don't have to enter the specific SID value each time.
importPackage(Packages.com.filenet.api.core);
importPackage(Packages.com.filenet.api.security);
importClass(Packages.com.filenet.api.constants.RefreshMode);
importClass(Packages.com.filenet.api.property.Properties);
function OnCustomProcess (CEObject) {
CEObject.refresh();
var apl = CEObject.get_Permissions();
var iter = apl.iterator();
var perm = null;
while (iter.hasNext()) {
perm = iter.next();
if (perm.get_GranteeName().toString().startsWith('S-1') ){
iter.remove();
CEObject.save(RefreshMode.REFRESH);
break;
}
}
}
#FileNet#Support#SupportMigration