cancel
Showing results for 
Search instead for 
Did you mean: 

Partial File picked up by XI

ADIDAS
Participant
0 Kudos

Hi,

In one of our Production Interface run we found that XI FTP Adapter Comm Channel was picking up files before they were completely written to by another legacy application.

We thought that because of the process lock by the writing application XI would not be able to poll/get the file and would only poll/get the file once it was completely written by the writing application. But we were proven wrong.

Is there any setting in the Comm chnnale that checks for process locks at file level or anything which can prevent XI application from picking up incomplete/partial files. For the moment increasing the polling interval has helped us in fixing the issue but we wanted to know if there is any cleaner solution for this.

Regards,

Arunava

Accepted Solutions (0)

Answers (4)

Answers (4)

subrai
Explorer
0 Kudos

Hi

The Best way I could suggest is to ensure that the file writing program writes the file with

a different extension(A.tmp) against the file name configured in the Sender Communication Channel(A.txt). Then you can you Operating System Command to rename it to A.txt(original file name). Use can use "Run Operating System Command Before Message Processing" feature of the File adapter to achieve the same.

ADIDAS
Participant
0 Kudos

Thanks all for the response everyone.

The option of Msecs to wait for file modification check would have been great and ideal had we not had content conversion in there. Unluckily as we get text files for most of our inbound interfaces we cannnot use this parameter.

Script option is ok but not a very clean solution and same applies for Operating system command as we get our files in an FTP server and not at a NFS mount system. In case of the file being present in an FTP server running the OS command gets convoluted as XI server issues the OS command and that has to get executed in the FTP server which involves setting up certificates and other stuffs.

Regards,

Arunava

Former Member
0 Kudos

Hey

Msecs to wait before modification check only works for NFS,It wont work on FTP at all(even if you have FCC or not).

we had the same issue and asked the sender system to write the file with some temporary name(for e.g. file.dat) and in the end rename it to current name(for e.g file.txt),make the sender file communication to pick only *.txt files.

Hope that helps

Thanx

Aamir

dharamveer_gaur2
Active Contributor
0 Kudos

Hi,

have a look at this thread to give you more ideas on its control.

check on this File adapter proprty:

Advanced Mode

To specify additional parameters in the adapter configuration, set the Advanced Mode indicator.

Msecs to Wait Before Modification Check

Enter the number of milliseconds that the adapter must wait before it checks whether the files have been changed.

This parameter is not available if you have selected File Content Conversion as the Message Protocol and then made an entry under Recordsets per Message that splits an input file into several messages.

Former Member
0 Kudos

Hi Arunava

PI File adapter does not have any. The workaround for your problem is one which you have already done to delay the process.

With this if you get into a situation where you need to pick a file at exact timings then you can go to advanced mode of sender File communication channel and set Msec value to wait before modification check. This will allow adapter to check the file and wait for any modification in the duration defined before processing.

Thanks

Gaurav

Former Member
0 Kudos

Let File Adapter pick the file from different location. You can run the script to copy the original files to new location before polling.