Occasional slow HTTP acknowledgement using pubflowsetResponse

On our client production site, they have conducted a sniffing test between the IS 6.0.1 machine and another server which sends and receives transactions via HTTP. It is found that ocassionally for some transactions, the HTTP acknowledgement sent by IS back to the server using the pub.flow:setResponse service takes more than 10 secs. We’ve followed Tech Support’s advise to clean up the WMSESSION and WMERROR tables. However, the issue still persists. It seems that even though the setResponse service execution time was logged to be almost instantaneous using debugLog, it took longer to leave the IS server and reach the invoking remote server.

The sniffing exercise has concluded that network traffic between IS and the other server wasn’t an issue since it was measured and found to be underutilized during the sniffing exercise. The flow service invoked by the remote server also DOES NOT perform any database activity BEFORE invoking setResponse.

Any advice?


The pub.flow:setResponse service does not instantly return the response you specify to the invoking client. Instead, it overwrites the default response webMethods generates (the pipeline content) with your own string and returns that string to the client after the invoked service has finished.
So, if your service can take a long time to complete, you will see the behavior you describe.

If you want the service to return the response first and then continue processing, you will have to code a async invocation mechanism, for instance by using the Java function Service.doThreadInvoke(…) or by publishing the document to the broker and handle the document using a trigger.

Hope this helps.



Another option, which only applies if you’re using Trading networks, is use a Trading Networks ‘Processing Rule’ to invoke a processing service ‘asynchronously’.

This sounds like an undocumented behaviour of pub.flow:setResponse (a bug?). Unless someone can point me to somewhere in Advantage website that this is how it is supposed to behave.


From the Builtin services guide, wM 6.1:

This does not exactly state that the response you specify is going to be returned immediately, it just states it is going to be returned.
The last sentence in the quote hints to the fact that it only impacts the returned data and not the mechanism to actually send this data back to the client.
However, I agree the documentation could be more specific about this.



I do agree for pub.flow:setResponse documentation should be more specific and we have seen many users confused when using this service.

Thanks koen for elaborate info.