I’m experiencing a mental block trying to set up the following scenario: A document is delivered from an external system to my IS by HTTP post. I want to publish this document locally, indicate in the HTTP response that it was received and provide a reference or tracking number in the response body. A subscribing service delivers the document by FTP to a legacy system. I don’t want to block until that system is done with it. But when it is done, I want to close the loop by publishing a reply that includes more data. I tried to do this with asynchronous publish-and-wait, returning the ‘tag’ number in the response and waiting for the reply document when all processing is complete. But although the process is ‘asynchronous’ the HTTP response is not truly issued until the top level service completes, and this doesn’t happen until waitForReply completes or the timeout is reached.
I have a nagging feeling I’m going about this in completely the wrong way. Would it help if I invoked waitForReply in a separate thread? Should I be using publish, rather than publish-and-wait? Should I finally force myself to learn Modeler and set up a business process model instead? Suggestions welcome. Thanks,