on 09-02-2011 11:54 AM
Hi PI Techies,
I have a confusion in using Sender FTP Adapter with Runtime OS Command before Message Processing.
Scenario is like this:
Ftp Adapter has to pick a file from FTP server after it checks that a Blank Marker file exists on PI server AL11 directory say "tmp directory".
For this I am using Runtime OS Command before Message Processing where a shell script will check the existence of Blank Marker file on PI server AL11 and if found , it exits the script and FTP Adpater will then pick the Actual Data File and Process it.
Now Confusion:
I am confused in technical execution of steps by FTP Adapter..
Whether FTP Adapter polling initiates the Interface or Runtime OS command checking the File existence will initiate the Interface?
May be its follish to you guys... but please answer ..
Regards,
Anurag
Exactly, only if File declared in FileAdapter exist, it instantiate the Scenario Execution.
You can set in Adapter the Marker Filename:
- When Marker File exist in PollDirectory, it execute the OS command to trasfer file to destination. Otherwise, the ShellScript can move the file to an "Output Queue" directory, and then send it with another FTP CommChannell (in polling to this "Output Queue" directory
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I will take it other way as we need to process the Data File not Marker File ( its just for checking the Data File is completely written on FTP server).
Other way mean " Will Poll for Data.txt File and if found then Runtime OS Command will do connect to FTP and check if Marker File exists, if yes then delete the marker file and read the actual Data File for processing.
Please let me know, if Marker File does not exists on FTP folder, will it still read the Data File or will it exit the Adapter execution?
Your help is much appreciated.
Regards,
Anurag
In your way, after Shell execution, It still execute the scenario.
In my way written above, you use the MarkerFile to Start the 1° Channel (and then, run the script), and move the DATAFILE (with the OS Script) to another "Output" directory. Subsequently, with 1° Channel you delete the file without send to a receiver directory. You can do this also putting the Shell Script in Crontab (like a scheduling).
With a 2° FTP Channel, you poll the output directory and send the file.
Another way, more complicated, is to develope a custom Java code, to do this.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.