Complete/Fail tasks based on webservice response body

Which IIQ version are you inquiring about?

Version 8.3

Share all details related to your problem, including any error messages you may have received.

Hello,

We are working on application integration using WebServices connector with REST APIs. We would like to know if there is below option available in connector/SailPoint config:
Application APIs are returning 200 success http status code but there are validation messages in the response body which we need to read and then mark the task in SailPoint as complete/fail.
Is it something feasible to do?

Thanks
Vivek Kumar

@vivek_kumar9
You can achieve this using the AfterOperationRule in webservice connector where you can read the response and do the action accordingly

Sample After Opeation rule URL is below

IdentityNow Rule Guide - Web Services After Operation Rule - Compass (sailpoint.com)

Though the guide says IdentityNow, rule code is common

Hi @vivek_kumar9,

You may use below sample rule and put your logic as per your expectation.

<Rule language="beanshell" name="Example WebServices AfterRule" type="WebServiceAfterOperationRule">
    <Signature returnType="Object">
        <Inputs> 
            <Argument name="log">
                <Description>The log object associated with the SailPointContext.
                </Description>
            </Argument>
            <Argument name="context">
                <Description>A sailpoint.api.SailPointContext object that can be used to query the database if necessary.
                </Description>
            </Argument>
            <Argument name="application">
                <Description>The application whose data file is being processed.</Description>
            </Argument>
            <Argument name="requestEndPoint">
                <Description>The current request information contain header, body ,response object</Description>
            </Argument>
            <Argument name="processedResponseObject">
                <Description>Response Object processed by the Web services connector</Description>
            </Argument>
            <Argument name="rawResponseObject">
                <Description>Response Object returned from the end system</Description>
            </Argument>
            <Argument name="restClient">
                <Description>REST Client Object</Description>
            </Argument>
        </Inputs>
        <Returns>
            <Argument name="Map which contains updated Account/Group List and connectorStateMap">
                <Description>Update information Map which contains parsed list of accounts/groups and connectorStateMap</Description>
            </Argument>
        </Returns>
    </Signature>
  <Source>
  <![CDATA[
    
  import java.util.*;
  import java.util.HashMap;  
  import java.util.List;
  import java.util.Map;
  import java.util.Map.Entry;
  import java.util.Iterator;
  Map updatedMapInfo = new HashMap();
  if (parsedResponseObject != null){
    log.info("Parsed response is not null");

    ////Put your logic here
	
  
  }
  
  return updatedMapInfo;
  ]]>
  </Source>
</Rule>

Thanks

Hi @vivek_kumar9 as mentioned by @iamksatish you can achieve that by After Operation Rule and in addition to the example he mentioned you can find another one or two in the Rules Guide in that link:
https://community.sailpoint.com/t5/Technical-White-Papers/Rules-in-IdentityIQ/ta-p/78176

Have a nice and great one!

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