Using a correlated document as a response of HTTP request

Hi All,

Need some help.
We are to provide a httd(s) using web service to the client.
In the response to the request, a correlated document is expected to be sent which might take some time to appear.
Also, in order to have the response document we nee to have a bpm process before since we need to log the msg sent to target. The target shall take some time to respond with the correlated document.

My questionsa are following:

1)Is it possible from the business process, that once we receive the corrlated reply document, we compose the response for the same http request we received ? If so, how ?
2) I also need to have some decision making if the reponse is not received in appropriate time. Here the role of business process in between is making it a bit difficult to design the scenario.

Can some body please throw some light? This is my first shot with web service and http communication.


You can use service: pub.flow:setResponse to set the response message with your reply document. But this is a synchronous interaction, if your system will take time to generate such response, the client system may timeout.
It’s never a good idea to use synchronous process for actions that take more than a few seconds.
You should consider to send response document in another http connection which initiated by your system,

I agree with Tong Wang…sync vs async response and the usage of it.