For my first weblog, I will try to give an answer to a forum question: Is it possible to use the same sender File adapter for the picking up of several files by excluding some other ones.
Forum thread: 2 files in 1 communication channel
1. All inbound files are defined with the same structure (Message Type).
2. All inbound files are inside a same source folder.
3. We want to use only one sender communication channel
Note: Obviously a solution would be to create different folders and/or different sender Communication Channels, but it's not the topic!
Inside a unique folder (called MHU), we have several files with different names. Some of them must be treated by Interface "I1", and others (e.g toto.csv) must be treated by Interface "I2".
In this topic, we see only the side of interface "I1". Thus our problem is to pick up files which are only needed for this interface. It's the case for the three first files: tata_1.csv, tata_2.csv and titi.csv, but it is NOT the case of toto.csv.
What we have in our folder before our XI treatment:
What we have in our folder after our XI treatment:
All files except "toto.csv" have been picked up by XI for interface I1.
Sender Communication Channel
Create a sender communication channel by using File Content conversion (for instance). The detail of this conversion is not explained here, see existing weblogs for more details.
Note: our polling interval is equal to 10s. It's interesting to keep it in our mind because we will find it further.
. Then choose option "Advanced Selection for Source File" and fill "File name Mask" as below.
With this solution N°1, inside SXI_MONITOR we have that:
See the StartTime: the three one are separated by 10s which correspond to our polling interval. Thus, even if just the needed files have been treated by our adapter, files have been in fact sent one by one !!
Solution N° 2: use also option "Exclusion Mask"
In this case, we use fields "Source Directory" and "File Name" as usually and thanks to option "Exclusion Mask" we specify the type of file which must not be processed by our interface I1 (e.g it's for toto.csv file).
With this solution N°2, inside SXI_MONITOR we have that:
This times, all our needed files are sent together and our "toto.csv" file (linked to interface I2) was never picked up.
This is one of the possible cases to use option
"Advanced Selection for Source File", and there are probably others ways by combining both options "File Name Mask" and "Exclusion Mask" .