I am looking to update the Account ID attribute for a source account when aggregating the account(s) in an after operation rule. When trying to perform the update I am getting the following error:
sailpoint.connector.ConnectorException: Error: class java.lang.String cannot be cast to class java.util.Map (java.lang.String and java.util.Map are in module java.base of loader ‘bootstrap’)
This doesn’t happen when I try to update any other attribute (just the Account ID). Does anyone happen to know if the Account ID is stored as a map even if it is listed as a string, and how I would potentially go about updating this map to end up having the Account ID be a different value than what was aggregated?
When I don’t try and put the updated attribute on the ID Attribute (if I place it as a different attribute) it works as expected. It looks the ID Attribute for the source when updated in the after operation rule is expecting a map, but I can’t find any documentation on what the map entails.
I believe in the After Operation Rule you can access the 'processedResponseObject ’ input object which is of type List<Map<string, object>>. This should contain a list of all the aggregated account map objects.
I have never tried to update the account ID attribute in the map, but I believe you should be able to traverse this List to grab each account map then do a put operation on the accountId attribute to populate the new value.
If this doesn’t work, my only other suggestion would be to try and build a new List<Map<string, object>> and then set the ‘processedResponseObject’ input to this new List at the end of the rule.
Thanks for the response. It’s good to hear from you, I hope you’re doing well too!
Unfortunately I’ve tried both using a put operation on the processedResponseObject and creating the new list to return. It seems that when updating the account ID attribute in the map it expects something of type map, even though the attribute is of type string on the connector.