on 01-12-2012 7:57 AM
HI EXPERTS,
My scenario is to pick file by file from a same directory.
For example, suppose they r 'n' files in source directory with the same .xml extension i have to send 1 by 1 with regular intervals to the target directory with a time gap of 1min each.
i am using windows xp and using sap netweaver 7.1
Thanks&Regards
Rajesh.A
SAP PI CONSULTANT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
For example, suppose they r 'n' files in source directory with the same .xml extension i have to send 1 by 1 with regular intervals to the target directory with a time gap of 1min each.
I knew that I read it here in an SDN blog that this is possible See this blog by Mickael find solution N*1
The key is to use advanced selection for source files. If you use a fileMask of *.xml, it will send it according to polling interval just as was mentioned on the blog.
Hope this helps,
Mark
Edited by: Mark Dihiansan on Jan 13, 2012 10:31 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajesh,
Write a simple UDF and have interval like below using the Thread.sleep():
{
try
{
Thread.sleep (40000);
}
catch (InterruptedException ie){}
return a;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajesh,
The requirement you have explained is how the Adapter normally works. If you have multiple XML files which have to be processed, the adapter will read one file at a time and then send the XML for processing.
Or is your requirement such that , only when the scenario for first file is executed sucessfully end to end , then the second file should be processed?
Regards,
Sushil.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sushil,
Actually my scenario is to process the file by file in a folder for every 30 seconds.
if there are 3 files in a folder with same extension the 1st file should be processed for the first time in 30sec and second file should be processed after another 30sec and third file should be processed after another 30 sec.Totally within 90 sec all 3 files have to be processed and there is no requirement to check whether the previous files are successfully processed or not.
Thanks & Regards,
Rajesh.Adiraju,
SAP PI Consultant,
Edited by: rajeshadiraju on Jan 13, 2012 8:23 AM
schedule adapter if doesnt work then implement logic in mapping level . write simple UDF and add sleep menthod(threads concept).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raja,
you cannot do that, because when there are several files in the source folder, there are pickup all together with the 1st run of this adapter, and then treated one by one in parallel: one XML message per file, and so your UdF will be useless as mapping which run in parallel... except if you use a EOIO process... but is it acceptable for his business?
Mickael
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.