Unix File to webMethods to EDI FTP Questions

Folks

Currently, our application running on a Unix machine will generate XML file into a Unix Folder

The Unix Folder is ‘exposed’ to our Window 2000 Server (running webMethods I.S.) via Simba

Our webMethods Integration Server (running on Windows 2000 Server) is
running as a Window Services using an LAN id/password not authorized to access the Unix Folder directly.

What I have done

  1. Map the Unix Folder via Window Exploer (using another user id / password)
  2. Create a Window Command File that move all the XML files from
    the Unix Folder to local folder (e.g. move *.xml from folder A to
    folder B)
  3. In my webMethods flow services, I will use a java service (which
    run RunTime.exec(commandFile) to invoke the command file to move the
    XML files to a local folder, then list all the files in the local
    folder, process each XML, convert to EDI (X12 4010 204), post to TN,
    then use webMethods Primary FTP delivery service to FTP to trading
    partner

Issues:

  1. If I use Process.waitFor(commandFile) to wait for the move to complete, webMethods just hang there and not moving any files
  2. If I do not use Process.waitFor(), each call the command file just move the 1st couples (actually 5) XML, which the command file should
    move every XML files (over 30+)
  3. When I use the Primary FTP Delivery Service, webMethods uses the task id as the filename.edi. Anyways that I can do to change it.

Please advise

Thanks a lot
Stephen Chung

Stephen,
According to dk java docs:

“Because some native platforms only provide limited buffer size for standard input and output streams, failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to block, and even deadlock”

I’d suggest processing the input/output/error streams.

One other thing am sure you are aware of is that Runtime.exec forks off a new jvm with same jvm settings (Xs/Xm) as the parent. So if you have multiple threads doing these execs, you could unknowingly run out system resources very quickly.

~tS

Just a thought…

How about a cron job to pick up the Unix file and FTP it directly to your Integration Server?

I’ve run into many “gotchas” with NFS and Windows drive mapping over the years in a production environment, and so try to avoid it for uses such as you describe.

Regards