We are working on WebService connector and have requirement to make a API call in Create Account - AfterOperation Rule. As a part of after operation rule we do not get reference to the provisioning plan object. We are using connectorStateMap to store the request provisioning plan information and retrieving it in the after operations rule.
We would like to know if there is any other suggested solution to retrieve the provisioning plan information in WebServices - afteroperations rule.
Hi @pallavi ,
accessing the provisioning plan in an after-operation rule can indeed be tricky since the provisioning plan object is not directly passed to the after-operation rule. Using the connectorStateMap to store the provisioning plan is a reasonable approach. However, you can define custom attributes or metadata within your provisioning plan and pass those values through the provisioning process. Then, you can extract these attributes in the after-operation rule via the connectorStateMap or similar mechanisms.
We are using connectorStateMap to do so. However, wanted to check if there is any alternate option. We are storing the provisioning plan attributes in the connectorStateMap so that we can pass to the subsequent target API calls which are made from the WebServices - AfterOperationsRule.
Why don’t you create 2 HTTP operations with operation as create account if you really need 2 API calls for every user creation. You don’t need to write custom code for making 2nd API call.
You can reference response from 1st API call to use it is 2nd API call.
We will check if that works for us. We need to execute the APIs in sequence and need to look at the response XML (for error desc tag) before calling the next API. APIs do return 200 OK in case of error scenarios as well
Hi @pallavi ,
If the status code always returns 200 irrespective of success or failure, you need to get the response body to see the status message (assuming status holds the API status).
The webservise connector indeed executes one API at a time and provides the reponse. In your case, both of your API execution happen in the before operation rule, only thing is you have the write the execution and parsing of response for your first API and the second API will execute through the Sailpoint engine.
Hi @KRM7,
In that case we will have to use connectorStateMap to get the values required to pass to the 2nd and 3rd API call. Documentation says that connectorStateMap values are stored permanently in the application object. What does that exactly mean? We cross checked but could not find any such information persisted permanently on the application object.
Do you need to make 2/3 API calls in total for create account operation ?
If yes, then is it for all users or is it conditional. For example, for certain users based on some attribute, only 1st API call is enough, 2nd API call is not required.
If you really need to access Provisioning Plan, you can consider Before Operation Rule which has Plan as argument, complete all operations in WSBO Rule, last operation will as it is taken care by HTTP operation, see if this suits for your requirement.
WSAO Rule returns a Map as an output which will contain a lot of information including Request end point, print and see what are all data it has, it is available in After Operation Rule only not entire application.
One change in recent times in me is avoid coding, use OOTB features to the fullest, it did reduce my work a lot.
All those 3 API calls are must for all the new user account creation requests. We are testing it using OOTB features by adding 3 separate calls for Create Account.