Updating Account ID for Webservice Source in After Operation Rule

Hello,

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?

Thanks for any assistance you can provide!

Hello @kjerauld

can you attach after operation rule here and please provide API response data of get all users. We will assist you according to that.

thank you
Mahesh

1 Like

Seems like you’ll need to do some sort of conversion from a map to string variable, something like map.toString();

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.

Hi Kevin,

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.

Hope you’re doing well!

Thanks,

Liam

Hi Liam,

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.

Interesting … are you able to log what type of object is attached to the account ID attribute and print its contents?

Posting a scrubbed version of your rule (or pseudo code) could help too!

Thanks,

Liam

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.