We have webservice connector, Account aggregation URL is giving only users details not groups, so to populate groups, by passing group id we need to get the member details, from that response we need to identify whether that user existed or not in group, so i’m trying to configure before/after operation rules,We have implemented before operation rule and storing some variables in application using “transientValue”, Can we use those variables in after operation rule. I tried to use but its returning null. Can any one please help me on this.
We have to configure web service source, where few limitations are there with end points, Account aggregation URL is not providing the users groups data, to fetch users group data, need to hit the URL with group id , Ex : /Groups/:id/attributes=members, where id is group id, so we can see all the user who are existed in that particular group, I have configure after operation rule to display the user groups information in user accounts. to perform that I have followed the below steps
Hitting the end point to fetch all groups ids.
Iterating the groups response for every id hitting “/Groups/:id/attributes=members” URL, to fetch the member details.
if user details found adding that group to user account.
Because of the above procedure I’m getting “Rate Limit Exceeded” error, so i tried to use the transient value concept to reduce the number of end point calls. I’m hitting the end pints and storing that data. but when i tried to fetch the data in same rule itself its giving null, its not storing the data. So i tried to use before operation rule and hitting the end points in before operation rule and writing
Do you have an endpoint to check which groups are assigned to the users using user id/account id. If yes you can use parent child account aggregation options and get both account details and group informaiton assigned to the user.
Here based on your latest response are you storing all the group ids as a map on the source? If you are doing that you need to fetch that map in afteroperation rule using application object and perform other endpoint calls.
Can you please confirm if there is an endpoint available like /Groups?attributes=members where you can retrieve all the groups information along with their respective members instead of iterating over each group. If this endpoint is available then you may not need the after operation rule and you can achieve this requirement with parent child endpoint configuration where first operation should retrieve the accounts and then the second one will retrieve all the groups along with their members and you just need to adjust the mapping to store the member as the account id.
IF this API is not available, then do you already know the number of APIs are accepted by the target application in 1 second as based on this information you can setup a counter and calculate the number of API calls being performed in 1 second. If the next call is being performed in the current second and the counter value has exceeded the threshold, then you can try to use thread.sleep(x) and see if that helps.
By the way which method are you using to update the transient information on the source as i do not any method in the java docs which lets you update the key value on application unless the rule is executed completely and you pass the information in connectorStateMap.