I need your help to understand why the rule didn’t work. I confess that this is the first time I’ve created this rule and I have no knowledge of how it works.
The idea is that if the SAP SuccessFactors “ManagerID” attribute is blank, the manager correlation should be performed based on an “AdministrativeEmail” attribute that is found in the source JSON in the “connectorAttributes” tab.
However, after aggregating SAPSF, it didn’t happen.
Can you put loggers to check what does connectorAttributes , administrativeEmail and managerID values hold?
Also, another thing you can try is:
Get AdministrativeEmail directly at line 17. You can remove line 15 if you use below: String administrativeEmail = application.getAttributeValue("connectorAttributes.AdministrativeEmail");
If ManagerID is empty you might hit NPE at line 20. So you will have to put Null safe check at line 20 and 21. You can replace them with
is the Administrative email on the account the manager email?
If is not you need to grab the manager ID find the proper account, grab the manager email and them return it. Simple as that. Thers no need to grab appliaction or connector attributes or anything. unless i missed the requirement.