cancel
Showing results for 
Search instead for 
Did you mean: 

Picking up files in a sequence order

Former Member
0 Kudos

Hi,

My requirement is to picking up the files in a sequence order,

The sequence no. (say for eg 1, 2, 3,etc)will be attached along with the files.

i.e file1.xml,file2.xml,file3.xml etc

suppose if my input folder contain file1.xml, file2.xml,file4.xml

PI has to pick up file1 and file2 and it has to wait for file3 to arrive.

ie. it shouldnt pickup file4.xml since there is no file3.xml.Sequence no3 is missing.

If i give processing sequence as name, it will pick file1 first and then file2 and file4.it will never check file3 is missing or not. how can i achieve this?

Is there any way to do this with out writting a shell script?

Accepted Solutions (0)

Answers (3)

Answers (3)

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

If you Use BPM wait step for this. Create 4 receive Step.

3 Receive step use check Start Process and 1 without this Check.

Former Member
0 Kudos

Hi Dharamveer,

No of Input files may vary. i cant predict how many files will be present in the input folder

.If the file3.xml is missing i have to raise an alert.

Former Member
0 Kudos

Hi

Using BPM wud be best ..try out with tat

rgds

srini

dharamveer_gaur2
Active Contributor
0 Kudos

It is not possible in simple way because file is picked in Alfabate sequence. since file3 is not present so it will pick file4.

SudhirT
Active Contributor
0 Kudos

Hi,

You can do one thing. Increase the polling interval as the expected time for the file3.xml to arrive in the source directory.

Thanks!

Former Member
0 Kudos

Hi Sudhir,

I can't predict the time.once PI finished processing file1.xml and file2.xml in the next poll interval it has check whether the file3.xml is present or not.if not it has to wait for file3.xml and shouldnt process file4.xml

SudhirT
Active Contributor
0 Kudos

Hi,

I think in that case, just use the dynamic getFileName java UDF in your mapping and in that UDF you can define the thread.Sleep interval after checking with the conditions for the file sequence.

Although I have never tried but this might be a right approach to achieve this functionality.

Thanks!