on 10-26-2007 8:32 PM
Hello,
I have a scenario where I need to query the database and get the list of files to be read from local path. Then these files are to be uploaded to FTP server.
How can I read these files from local path where the filename of the file to be read is in message payload.
Please help.
Thanks in advance,
Beena.
I dont think using XI would be right for this kind of requirements...!! It would be costly to us XI for such requirements.
VJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
do u really want to do this scenario via XI:)
anyways,see you need to split your scenario into two parts,the first scenario would be sender system->XI->JDBC synchronous.
get the names of all the files and store them in a flat file.
now write a Perl or Unix script to read the first file name,open a I/O stream and then write the file to FTP server,similarly read the subsequent file names,open I/O stream and deliver them.you need to schedule this script using windows scheduler or some other tool available.
Thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for reply.
Can I write adapter module for file receiver(ftp) , read the file name from payload and read the file from local path and upload to ftp?
It is actually part of scenario where I have types of files and no of days.
I need to get list of all files for given type for each day, get the data from database , append the file name and read the files and then upload it to ftp.
And then update another file for all the files which are processed.
This scenario is scheduled for everyday.
Thanks,
Beena.
Hey
what is the sender system in your case?
adapter module can be an option but i have never tried it though,i had a similar kind of requirement and i used scripts.
see if u want to avoid scripts them chances are you need to use BPM or modules(if the sender does not supports sync scenarios),BPM leads to performance issues.
let us know ur sender system so that we can help you better
Thanx
Aamir
Thanks for Reply.
Actually I need to schedule this in xi itself.
Everyday I need to get the list of files and upload them.
I also need to read one file which contains all files that are processed (Ids).
I have to upload the files from the list only if it does not exist in Id file.
I have to update the Id file once file is uploaded.
I was planning to use file sender channel to read Id file everyday.
Then I will use value mapping table to read types of files and no of days.
I will read the database for list of files.
I think I can not avoid BPM here as I need to update the Id file once all files are uploaded to ftp.
So I need to retain the Id file status.
However whether I use BPM or not, I dont find way to read the files from local file with dynamic file names in request/reply mode as XI is demanding data here and file adapter is asynchronous.
Let me know if I can avoid BPM here or if there is other way to do this to avoid scripts. I want to upload the files using ftp channel only, but I think I will have to use script or module to read files from local path.
Thanks,
Beena.
so basically your scenario would be File to JDBC sync.
if u want to avoid BPM you can use modules on sender File adapter to make it sync.there is a thread on SDN(not blog) by Bhavesh where he has given the name of modules u can use to make File adapter sync,but that works only after SP19.
now lets assume that your sender file adapter has been made sync(via modules)so now u can send the request to JDBC and get the names of files in payload.
and write this on the file system,so now u have a file on the File system containing the names of all the files to be picked up.
here u will run a script after message processing,this script will read the list of files and upload them to FTP.
you can avoid BPM provided ur on SP 19 else u have to use BPM to get response to file
Thanx
Aamir
u got me confused now:)
>>I think I dont need script if I am writing names of files in a file.
ofcourse u don't need scripts for this,i was talking about another thing
see the file which will be delivered to you from JDBC will have a list of all the file names which need to be picked,right?lets call that file as FileNames.txt suppose this file has names of 5 files which need to be picked.where will all these 5 files be?will they be in same directory or different directories? what will be the naming convention?
now if u pick FileNames.txt via sender File adapter and want to deliver it to FTP then even via using Variable substitution you will be delivering FileNames.txt,not the 5 files whose names are inside.
if there is anything i m missing,please reply back
Thanx
Aamir
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
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.