Service Callout in PostClientFlow

nikhilchawla
Participant III

Hi,

Can i use Service callout in Post client flow ? My requirement is to send notification to one of the back-end system when response is already been send to client. I have to make an async call to backend after doing all operations in the proxy.

Solved Solved
1 4 1,762
1 ACCEPTED SOLUTION

I think you cannot. You CAN, however,

Edit: you can make a fire-and-forget call using ServiceCallout by omitting the Response element from the SC configuration. See the documentation on this policy for more on that.

You can also make a fire-and-forget call using a JS callout.

Neither would work in the PostClientFlow, but either would work in the Response PostFlow for the proxy endpoint. That is "as late as possible", AFAIK.

View solution in original post

4 REPLIES 4

I think you cannot. You CAN, however,

Edit: you can make a fire-and-forget call using ServiceCallout by omitting the Response element from the SC configuration. See the documentation on this policy for more on that.

You can also make a fire-and-forget call using a JS callout.

Neither would work in the PostClientFlow, but either would work in the Response PostFlow for the proxy endpoint. That is "as late as possible", AFAIK.

Hi Dino,

In case we have to use mutual tls between the connection, will you advice to use JS for the connectivity.

I tried removing the response attribute from service callout as mentioned in the docs here and in trace I can see that the SC is taking less than 2ms and logs are there in splunk.

I had tried with timeout but that didn't help.

Should I see this as an asynchronous call? Kindly advice.

-- posted a separate question here

Thanks

Pratyush, I answered there.

PostFlow in Proxy Endpoint is good enough for this purpose. PostClientFlow only allows MessageLogging policy at the moment.

You can make an asynchronous request using Javascript.

The following article talk about logging and asynchronous requests to push logs. This is a good reference for your use case.

https://community.apigee.com/articles/32286/logging-to-sumo-logic-using-javascript-and-http.html