Schedulers Processing Files Twice

Hi everyone,

     The flow for one of the interface is like this, Trading partner places the files in a VAN and we pick up the files from the VAN , for this we run one scheduler which will login in to the VAN and get files and places in our ftp directories. After placing the files in our ftp Directory we run another scheduler to process these files, and the time gap of these two schedulers is 15 min.


The Problem i am facing is

We are having four servers and in all the servers , the schedulers which i menctioned above are enabled. But due to some reasons or other ,the process is not happening exactly as i menctioned above, which is leading to below problems:

  1. while processing the files , the files are being processed twice, i mean i see duplicates are being processed and sent out from our IS to target system
  2. And some times i see files are processed only once in our servers and at the targert system files are being duplicated.

Any advice regarding the above problem ?

regards,
Rajesh

When one of the 4 is going to process a file, the first thing it should do is rename the file. The rename should be to either a name that isn’t being polled by the 4 servers. Or to another directory (a rename can move a file to a directory).

This rename step “reserves” the file for the first server that tries to pick it up.

The typical logic:

  • Get list of files
  • For each file in the list[INDENT]* Rename file (to reserve for “me”; ignore not found error–someone else picked it up
  • Process the file
  • Move the file to a “completion” or “error” state; this might be a specific filename extension or other directory[/INDENT]

It is not a good practice to keep one common folder where multiple files and placed and then Multiple IS polling to those files.
Instead , when you get files from VAN , have logic to distribute files into different dirextories like IS1,IS2,IS3… and then each IS’s scheduler will then look at dedicated directories for that IS.

Also Make sure IS looks for a file only after the ftp is complete from VAN to dir.

I disagree. I’ve done so without issue, both with the wM file polling port and with custom polling facilities. It is fairly straight-forward.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.