Hi All, we have identity profile created for non human accounts that exists on AD. For this, we created a separate AD source with filter to not include user object type. For these non human users we store the manager ID value in extensionAttribute9. For a lot of these accounts there are multiple manager assigned to them and are comma separated. The manager correlation on source UI is set to identity attribute extensionAttribute9 equals account attribute extensionAttribute9. For the users with multiple manager, this does work as it is unable to find an identity with multiple IDs. For this, I have written a manager correlation rule. Could you please help me validate if this rule would work. The rule validator seems to give error Could not retrieve definition for variable name âaccountâ String extAttr = account .getStringAttribute ( âextensionAttribute9â ). When I pass static value in variable extAttr then the validator return 0 error. Please find my code below:
Map returnMap = new HashMap();
//Fetching extensionAttribute9 value
String extAttr = account.getStringAttribute("extensionAttribute9");
log.error("Value of extensionAttribute9 is:"+extAttr);
//Split the value by comma
String[ ] managerIds = extAttr.split(",");
String firstManagerId = null;
String singleManagerId = null;
//Checking if there are 2 or more values and returning the manager value
if ( managerIds.length >= 2 ) {
String firstManagerId = managerIds[0].trim();
log.error("Value of first manager Id is:"+firstManagerId);
String secondManagerId = managerIds[1].trim();
log.error("Value of second manager Id is:"+secondManagerId);
} else if ( managerIds.length == 1 ){
String singleManagerId = managerIds[0].trim();
log.error("Value of single manager Id is:"+singleManagerId);
} else {
log.error("extensionAttribute9 does not contain any value");
return null;
}
if ( firstManagerId != null ){
returnMap.put( "identityAttributeName", "manager");
returnMap.put( "identityAttributeValue", firstManagerId );
} else if ( singleManagerId != null ){
returnMap.put( "identityAttributeName", "manager");
returnMap.put( "identityAttributeValue", singleManagerId );
} else{
log.error("extensionAttribute9 does not contain any value");
return null;
}
return returnMap;