Leveraging a WebServices Before Operation rule tied to an Update Account operation that will execute a GET request to search for a user account and extract a value from the response which will then be added to the jsonBody of the main Update Account (PUT) request.
List<String> allowedStatuses = new ArrayList();
allowedStatuses.add( "2**" );
Map header = requestEndPoint.getHeader();
String employeeCodeFilter = "EmployeeCode eq 'ch00009'";
String encodedEmployeeCodeFilter = URLEncoder.encode(employeeCodeFilter,StandardCharsets.UTF_8);
//retrieve the configured Base URL from the Source
String baseUrl = application.getAttributeValue("genericWebServiceBaseUrl");
String fullurl = baseUrl + "/odata/Custodians" + "?$filter=" + encodedEmployeeCodeFilter;
WebServicesClient client2 = new WebServicesClient();
Map args = new HashMap();
args.put(WebServicesClient.ARG_URL,baseUrl);
client2.configure(args);
String response= client2.executeGet(fullurl, header, allowedStatuses);
The final line generates the following error:
sailpoint.connector.ConnectorException: 500 : {"error":{"code":"666666","message":"SW666666-Unknown Sql exception"}} BSF info: Rule - WebServices Before Operation Logging at line: 0 column: columnNo\n\tat
The resulting fullurl value is a valid endpoint that does return the desired data in Postman.
Appreciate any insight on what I need to do differently. Thx