How to use a CONNECT-SOAP rule in an Asynchronous way.
Hi All, within our application we currently have a CONNECT-SOAP rule that is running in a synchronous way, with immediate execution. When we call CONNECT-SOAP within an activity we use execution mode Run.
Our business is changing the way that this API (to which we connect with the CONNECT-SOAP) works in order to prevent timeouts that often occur with an external source. The API will now execute in an Asynchronous manner.
This will mean that when we call the API from our application we will get a transactionID and that will be it.
We are being asked to provide a URL (I am interpreting this as a SERVICE-SOAP on our end) that they can send the response back to along with the transactionID so that we can marry the response to the original Request.
Upon receiving this we would send back a response to confirm receipt.
I have been reading on community and amongst Pega documentation to understand how to do this and I keep contradicting myself. Although the SOAP API will be asynchronous, it occurs to me that as we are expecting a transactionID back initially, we may still be treating this as synchronous from our side. Am I correct here?
Should we be setting the Request Only checkbox on the CONNECT SOAP rule to unchecked (synchronous)? Image attached.
I am stuck also with how to marry up the call that they will send to our SERVICE-SOAP. This will contain the response which I need to link to the appropriate case (which will still be active) using, I assume, the transactionID. I think I need to change the CONNECT-SOAP call within the activity to use ExecutionMode RunInParellel and then follow this with a CONNECT-WAIT, but I am not sure. I cannot see how I marry this up. Or is the marrying up done with the service activity of the SERVICE-CONNECT ?
Run — Execute the connector synchronously; the next step of the activity containing the Connect-SOAP method does not execute until the connector response is received.
Run in Parallel — This connector is to run in parallel as a child requestor of the current requestor. If selected, use the Connect-Wait method later in the current or a follow-on activity to access results from the connector. SR-3483 B-20340SR-4269 B-21569 restrictions B-14106 B-20340 ABLAL Do not select this value if the Connect SOAP rule supports compensating actions.
Queue — Add this connector request to a queue, defined by a Connect Request Processor data instance, for background processing by the Pega-IntSvcs ProcessConnectQueue agent. GRP-255 5.5 This mode works only if the Request Processor field on the Service tab of the SOAP Service rule identifies a Data-Admin-RequestProcessor-Connect data instance. When the agent executes a queued connector request, the execution is performed with the authorization profile of the original requestor.
Thank you for your reply, I have had a look through however I am still not clear on how we should progress within our application. I should probably give more context to what we are trying to do as I suspect I have not explained myself awfully well.
Today, we call an API via CONNECT-SOAP. The call is a synchronous call. In order for our case to continue, we need the response from this call and it usually returns within 30 seconds.
In the future, the API that will call will be running async. When we call it, all we will get back is a transactionID. For our case to continue, we need to wait for the API to call us back (to a SERVICE-SOAP rule I suspect) before our case can continue.
My question really is how can I join this all together? When that call comes back to our SERVICE-SOAP rule it will also have the transactionID. Is there an OOTB way to join this to my case or will I just have to create something myself within the Service Activity?