on 10-25-2013 9:25 PM
HI,
I am using SAP PI 7.11 (OS-Windows)
I have a interface where file is being read from a FTP location, using file adapter (sender file communication channel).
The requirement is to read the files from the FTP server one by one (sequentially), maintaining a gap of few minutes between each file access.
I am not allowed to use any OS level script.
Can this requirement be achieved using SAP PI alone.
thanks n regards
HI All,
Thanks for all responses. Finally i have decided to use a script at OS level to move files from one folder to another introducing a delay, as i think its easy to implement without disturbing the existing interface design.
But now struggling with another hurdle. In the OS level (Windows 2008) i have scheduled the script to move files every 1 min. But the client requirement is to have lesser duration. And in Windows 2008, there is no option to schedule a job with interval of less than 1 min. Trying to see if that can be done somehow.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sudeep
Use EOIO in sender adaptere and then go for BPM. In NWBPM the delay can be put easily. Check the
blog below
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sudeep,
You can easily add delay between files by using sleep/choice command in file channel "Run opearting system command after message processing"
If you have unix system use sleep command
this will introduce a delay of 60 secs between files
if you have windows system use choice command:
choice /c:yn /t:60 /d:y
Thanks,
Anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sudeep,
You can try
1. Use QOS as EOIO to read files sequentially.
2. you can provide arbitary name of the queue.
3. You can use java mapping (in case this is a pass through scenario) to introduce a delay of 1 minute.
Even you can randomly set this delay interval. If this is not a pass through scenario you can use UDF also to introduce delay in the scenario.This way you can ensure that there is a few minute delay between processing of files. Please check this thread http://scn.sap.com/thread/3433549 and my response to it. This logic is to be transformed into java mapping.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anupam,
I tried your solution, but it is not happening. it is rather behaving abnormally.
Steps i followed:
1. QOS=EOIO in sender channel.
2. intruduced delay in Java mapping (by writing code Thread.sleep(120000))
But now the scenario behaves unexpectedly.
I have some 24 files in the source folder.
As the sender channel polls the folder, all messages are picked and sent to Integration Engine ,as seen in SXI_MOMNITOR (being processed throuh the same queue).
But the queue processes files in bulk. Sometimes messages get processed together producing four files in the output folder, and sometimes 5 files get processed together.
Hi Sudeep,
why don't you try Changing QOS(file channel-> processing tab) to Exactly Once In Order(EOIO) and provide a queue name.
Thanks
Hari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If i use QOS as "EOIO":
1. Will the files get read sequentially?
Yes.
2. Can i give any arbitrary name for the Queue?
yes. you can give any name as your wish.
3. Will there be a delay between the file access? Will this be equal to the "Poll Interval" defined in the channel?
You can not make delay with the help of EOIO. say if you set poll interval as 60s after this time adapter will poll the directory and pick the files. if 10 files found, all will be processed with in a matter of second. so it will not provide any delay in here.
Regards,
Muniyappan.
Hi Sudeep,
I don't think it is possible to read the files sequentially with a gap of few minuites.
You may have to pick the files (By Date) and then use BPM for this scenario to induce delay.
One thread which discusses the same requirement https://scn.sap.com/thread/1472536
Cheers,
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Ambrish,
Can u elaborate how BPM can be used in this case?
My understanding is, if we have a File->BPM->File interface. The sender channel will poll all files in the source folder simultaneously and create multiple instances of the BPM, producing all output files simultaneously.
Even if we use EOIO in the sender channel, it may not help. As i have tried EOIO and delay induction through UDF (which didnt work).
Thanks for helping.
Hi Sudeep,
EOIO with UDF or Java mapping will not work because the file might be picked up sequentially but might be processed within a second with delay in each message which does not induce a delay in message processing becasue all the threads (messages) execute independently.
>>>> how will the BPM work.
Please check Baskar's reply in the thread http://scn.sap.com/thread/2038059.
Hope it clarifies else revert back here pls.
Ambrish
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.