Calling Shell Script from webMethods Performance Issue

Hi Friends,

I have a requirement to call a unix shell script using a java service(using java Process Runtime ) in webMethods each time I receive a document from Broker. (webM and unix resides in the same physical machine)The java service is called in a flow service. The shell script should be executed in some cases:

Asynchronously - The shell script will be executed as the last step of the flow and the java service does not expect any output from the script.
and in some cases
Synchronously - The shell script will be executed and the java service expects an output from the script. Once the output is received the next service in the flow has to be executed.

My question is what may be the effect of such a/synchronous calls made to a shell script in terms of performance. I am expecting few thousands of documents to flow between Broker and Integration Server everyday.

Will be thankful if anyone can share their knowledge/experience on this.

Using shell scripts is not a problem that I have seen, either asynchronous or synchronous.
Performance issues would be found more in what the shell script did. WebMethods will handle these issues but you must be sure the script is written with performance in mind.

Jim, Thanks for your reply.
Let me explain what the shell scripts does - they call 4GL programs which load data from a Oracle table to another after performing some business validation. The shell script is executed in a flow service and once the execution is complete the flow service proceeds further(for synchronous calls) , i.e. the webMethods flow service needs a feedback that the shell script has finished the execution which can be take 1 min. for large documents. As I have mentioned 1000 s of documents will be processed in production each day.

Any thoughts ?
thanks
Samrat

Fred,

You have to read from those streams (if there is potentially a lot of output) asynchronously before the waitFor() or the process will hang once the output is the size of the JVMs default stream buffer size.

That's a good explanation.  I've seen something similar outlined in an article about the topic - [url="http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html"]http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html[/url] .  

Nick F

Thanks Friends, these will be helpful for me. However I guess the waitFor() is not required for the asynchronous calls. Please correct me if I am wrong.

Samrat