cancel
Showing results for 
Search instead for 
Did you mean: 

File should not be processed until completely written

Former Member
0 Kudos

Hi Experts,

My scenario is proxy->file(xml). The file will be huge.

Once the file is kept on the target location, some crons will pick this file for processing.

How can I make sure that the file should not be picked by crons until the file is completely written on the target location by PI file receiver adapter?

Your inputs will be highly appreciated.

Thanks and regards, Prasad

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks a lot for all your answers.

Former Member
0 Kudos

Hi,

try to increase the polling interval of the cron job running in the target system based upon the time taken for you to write the file to the target directory.

Regards,

Nithiyanandam

Former Member
0 Kudos

Hi Prasad,

In your file receiver communication cahnnel under proessing paramters --> write mode use the option Use Temporary File and give some name. Then while writing it writes to a temporary file and then the whole file will be moved to original directory.

Regards,

---Satish

Former Member
0 Kudos

Hi Satish,

Thanks a lot for yout reply. I have another question on the same.

When XI creates temporary file, where will this temporary file be created?

And please correct me if my understanding is correct on below.

If we select 'Use temporary file', then XI first creates this temporary file, writes all the data to it and then moves the whole file to the target location. And if we select 'directly' then XI first creates the file on target location and then it starts writing the content to the file. Is this understanding correct?

Thanks a lot.

Regards,

Prasad

VijayKonam
Active Contributor
0 Kudos

Yes. Temporary file is written in the same location as the target file. It will renamed once it is completely written.

VJ