on 08-01-2007 4:10 PM
All,
We have a scenario - where there are 2 input files. One is the data file - "Datainbound07102007.txt" and the other is the indicator file - "Datainbound07102007Complete.txt".
The second file is there to indicate that the first file has been downloaded and complete. The requirement for us is, check for the existence of the indicator file and if it is there, pick the data file.
Since we will be using 2 separate communication channels - how can we control this and prevent the communication channel for the data file pick the incomplete file?
Thanks.
Hi,
Set up you first File communication channel to wait for the file "Complete.data".
Then set up your second File communication channel to wait for "Datainbound07102007Complete.txt".
In the second communication channel there is a setting "Run Operating System Command After Message Processing.
Put in the value:
mv Datainbound* Complete.data
for unix systems or
ren Datainbound* Complete.data
for windows systems
This will rename your data file to the name expected by the first communication channel.
I hope this is clear.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This would probably be easier if the indicator filename was part of the data filename.
So:
indicator: "inbound07102007.txt"
data file: "datainbound07102007.txt"
Then you could probably do the following:
mv data%f complete%f
where "%f" represents the name of the indicator file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thezone,
if your only requirement is to guarantee that the file is only picked up when it is fully sent, just use the <i>Msecs to Wait Before Modification Check</i> parameter in <i>Advanced Mode</i> of Sender File adapter. Use a reasonable interval (half a second would be long enough).
If you do want to use the 2nd file in the control logic, use a BPM with 2 receivers steps, each one getting the files from a different sender file adapter, and use proper File Name masks in order to receive the correct files in each adapter.
Regards,
Henrique.
Ok, i just checked with the external system. Here is their naming convention. The data file is named as "datainbound07102007.txt" and the indicator file is named as "datainbound07102007.cmp".
From XI perspective, once we get the "datainbound07102007.cmp" file, we need to rename the data file's name from "datainbound07102007.txt" to "XIdatainbound07102007.txt" (prefexing the actual name of the data file with XI)
Hope this clarifies the question even further.
Thanks.
In the unix command, how do we maintain the date stamp suffix properly?
Example - Assume, we get 2 files in a day "Datainbound07102007.txt" and "Datainbound07102007-2.txt" and their corresponding indicator files also.
What post processing command should we use on the indicator file's communication channel to rename the 2 data files as follows, (adding the word FULL to the end of the file before the datestamp)
"DatainboundFULL07102007.txt" and "DatainboundFULL07102007-2.txt"
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try for the option with adapter modules using the concpet of dynamic file name. let the file path point to Datainbound07102007.txt if the file naming convetion is standarised like having "Complete" tagged to the end to mark the completion of the datafile then in module check if this Datainbound07102007Complete.txt exists. If yes refer FileName to the Datainbound07102007.txt else not found append "Complete" to the file name Datainbound07102007 making it as Datainbound07102007Complete.txt . In this case the CC will not truigger until the file is present. All these are controlled in coding part & Hope this might work
Message was edited by:
Prabhu S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I also think its far simpler than having to develop a BPM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Here BPM looks to be better option, because you have persist data of one file to pick the data of the other file.
Regards
Ramesh P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use a bpm. first recv step for indicator file. if this file is present the CC is triggered and hence the BPM. following another recv step for data file. this will ensure the process is followed. set the correlation accordingly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is how it is, first the external system starts writing the "Datainbound07102007.txt". This file might take sometime, once it completes the data file. It writes the "Datainbound07102007Complete.txt" (this is an empty text file). This file indicates that the external system has completed writing the data file and it is not in between.
Since communication channels just monitor the FTP location for the presence of the file - how can we make them wait till another file is present.
Even if we use ccBPM - as suggested with 2 receive steps - first one for indicator file and the second for data file. Wont the COMMUNICATION CHANNEL pick up the data file as soon as it sees it? (even though the indicator file is not there?)
Thanks.
the first recv step only initiates the BPM and not the second one. only when both the recv steps are placed in a fork the processing are independant of eachother. hence in ur case this shud not be a problem as u will have the recv steps one after the another. in this way till the Datainbound07102007Complete.txt is traced the CC is not going to fire and at the sametime the BPM will not be initated until a message is recv inside the IP
Let me try to understand this.
you are saying unless the BPM is active (which happens by the presence of the indicator file, as this would be the start process step), the 2nd communication channel wont pickup the data file even if the file is there.
i thought generally - the communication channel picks up the file based on the polling interval and tries to determine the receiver. In this case, it wouldnt find any - since there is no instance running and would error out. ("No receiver case" or something similar)
Thanks.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.