Ansynchronous FTP in webmethods

IS it possible to do an ansynchronous ftp in webmethods?

The issue is that we use web methods ftp api to put file to an external
server. The thread stalls until the ftp process completes. This hangs the clients session until the ftp completes. We want to prevent this by making the ftp asynchronous. If this possible please let me know how to.

Hi Ketan - If your requirements allow for it, you can use the publish/subscribe mechanism to make the FTP asynchronous.

Hi Ketan.
Yes it is very much possible.

  1. Create a FTP service using the Webmethods FTP services available at pub.client.ftp:*

  2. You can read the ftp parameters from custom config file or hardcode or put in extended profile or in delivery methods.

  3. In FTP custom service read these information and do the FTP.

  4. In processing rule use the 2nd option “Perfom the following option”

  5. Select your FTP service.

  6. Select the Asynchronous option.

If you are using the delivery methods of TN to do FTP there is a option of queue the delivery by selecting the option “Deliver Document by”. and Schedule delivery. See more details on that.

Hope it will help…


As Rajesh suggested, it would be fairly straight forward to turn this into a pub/sub solution. I’m assuming the client you are referring to is external to webMethods. The publish interface(flow service) within webMethods would accept the incoming request and do any formatting into a common structure and then publish the document to the webMethods broker. At that point your client is done. Although you might want to return a friendly “I got the request message” back to the client. You then need to build a subscribing service that will handle the ftp duties. This service will subscribe to the document you publish, handle any data formatting needed for the target system and ftp it.

So the external client is not blocking and waiting for a response to the ftp tasks. Plus you can add other subscribers later if needed as well as additional publishers. None of which are tied to each other resulting in a less brittle architecture.


I agree with Mark.

Especially the less brittle architecture part!

Interesting. I just read this thread ( – which had a debate on using TN v/s Enterprise… and then came across this thread.

I think both approaches mentioned above - pub/sub & TN delivery - would work. It just depends on the architecture that Ketan has… whether he has TN, or Enterprise, or doesn’t have either, but just uses IS. In the latter case, I think a Java service would be needed.

I’ve developed a java service that invoke a flow service with Service.doThreadInvoke, that executes it in another thread.
This flow service have an input that contains a file sent by ftp and executes a flat file parsing.

I have a problem with the object that contains the file, it is obtained from the pipeline with the variable contentStream, and arrives empty to the thread, and return an exception Unable to find input delimeters too short.

I’ve tried some things: sending directly the IData pipeline of the variable that receives the invocation of the java service (it doesn’t work), or creating a new IData input, where I store the content of the pipeline…

This is the code

public static final void updateRefSEDA(IData pipeline)
throws ServiceException {

IDataCursor pipelineCursor = pipeline.getCursor();
Object file = IDataUtil.get(pipelineCursor, “contentStream”);

// input
IData input = IDataFactory.create();
IDataCursor inputCursor = input.getCursor();
IDataUtil.put( inputCursor, “contentStream”, file );

ServiceThread st = null;
st = Service.doThreadInvoke ( “com.lda.qyr.seda”,“updateIdRefSEDA”, input, 2000);
}catch( ISRuntimeException e){


Another option is sending the pipeline directly

st = Service.doThreadInvoke ( “com.lda.qyr.seda”,“updateIdRefSEDA”, pipeline, 2000);

Do you know why the content goes empty to the thread?