cancel
Showing results for 
Search instead for 
Did you mean: 

Easy way of procesing files using sender File/FTP adapter

Former Member
0 Kudos

Hi experts,

In order to process files with a sender file adapter I am interested in avoiding processing non completed files. I mean files that are still being sent. My provider send an .XML file and when the sending is completed a .CTL file with the same name (and diferent extension).

So, my question is, wich of the nexts is the best?

-Implement an adapter module who recognizes the .ctl and then processes the XML file. -> Is there any standar module doing already that?

-Use adapter standart parametrization: Run operating System Command Before/After Message Processing, some advanced parameter?

-Doing nothing, PI only processes completed files (possible??), or if it processes a non completed you can retry.

-Other

Points for the best/easiest solution.

Regards

Gonzalo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Gonzalo,

I have implemented this kind of scenario in my earlier project and i have chossen custom adapter module.

Req: Process .txt file once you have .flg file as same location.

It would be better if you will go with adapter module because through that you can raise the exception in RWB if you won't find the.ctl file saying "..ctl file is not available so can't process . xml file".

There are few more options as well like batch file Run time os command before messaging processing.

Regards,

Kunaal

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Thank you for your help. I will probably go with the custom module .

About the "Msecs to wait after modification" option, I can`t, my file adapter goes throw FTP. But it was a very good option if I had a file without FTP.

Regards

Gonzalo

former_member187339
Active Contributor
0 Kudos

Hi Gonzalao,

>>Implement an adapter module who recognizes the .ctl and then processes the XML file. -> Is there any standar module doing already that?

No there is no such standard module available in PI

>>Use adapter standart parametrization: Run operating System Command Before/After Message Processing, some advanced parameter?

Again this is not possible as only after reading a file it will execute OS commands

>>Doing nothing, PI only processes completed files (possible??), or if it processes a non completed you can retry.

No you can' take this risk (unless there is a OS lock on the file which is being written)

>>Other

so i will go for other solution like:

A batch program which will check whether a ctl file exists and if it is found then it will ove the .xml file to one folder (where pi is polling) and deletes the read ctl file.

This batch code will be made to run for say every 5 sec or depending on the frequency of the interface

Regards

Suraj

former_member181962
Active Contributor
0 Kudos

Hi,

You can make use of "Msecs to wait after modification" option.

This way, the file adapter will not pick the file, until it is building itself.

The easier way is to tell your file adapter to pick only *.ctl file.

YOu can specify the file name as *.ctl

Note: (Not sure if ctl extension files are accepted by XI or not)

Regards,

Ravi Kanth Talagana