We have a situation where we want to run a POST out to an external system's service. This is with a Connect-REST rule. This service does not return any response. We essentially are passing off control to this other system. We would like to close the open work object and end any threads when we do the POST. Our concern is we do not want to accidentally leave any open threads hanging, waiting for a response from the POST. Does anyone have advice on how this can be done from the pega side?
***Edited by Moderator: Pooja Gadige to add platform capability tag***
@DaytonP5 REST calls, like all HTTP-based communication, are blocking calls. The thread holds the connection until the REST endpoint returns a response and the client closes the socket. In Pega, there are a few ways you can optimize the scenario that's being described. First, make sure the Response timeout value specified on the REST connector is set to a low value. Don't set it too low, as the same value is used for both connection timeout (i.e. time limit for establishing the connection to the endpoint) and socket timeout (i.e. time limit between successive packets coming back from the endpoint). Second, decouple the REST connector call from the primary requestor thread by calling the connector from an activity with either the RunInParallel or Queue option selected as the ExecutionMode parameter on the Connect-REST step.