XI Sender file adapter - How to process data and control files.
I have the following requirement to fulfill: I am using an FTP client (XI Sender file adapter) to retrieve data from an FTP site. To make sure I am not picking up a data file that is currently being written to, 2 files are actually present on the FTP site (for each data file):
1. abc.ctrl (control file with no data in it. Indicates that the data file has been completely written).
2. abc.dat (actual data file).
I want the file/ftp connector in XI to retrieve the data file (abc.dat) only if the control file (abc.ctrl) is present. After the processing of the data file is finished, both files (.dat and .ctrl) should be deleted.
Is there an elegant and robust way to accomplish this?
Thanks for your help.