File Listener creates one file for many input files
A file listener is supposed to create one CSV file for each input data file. If more than one file is dropped into the source directory for the file listener, only one file is created. If the files are dropped into the source directory one at a time then the appropriate number of output CSV files are created
No error message is displayed in the logs.
Steps to Reproduce
Upload four files into the source directory and only one CSV is created.
Upload the four files individually and there are four output files created.
The root cause of this problem is a defect in customer application code/rules.
The file listener uses a Connect File to write its output CSV file. The dispensation of the output file, should it exist, is to overwrite the existing file.
The file name is given by a declare page. The scope of the declare page - if either node or requestor - will cause the contents to remain the same for the run of the file listener.
Therefore the last input file read by the listener will determine the contents of the output file.
The explanation for this behavior is as follows:
This is expected behavior.
The file listener is designed to exhaust the contents of the source location directory of all files that match its given file mask. Given the scope of the declare page is at the requestor level and the output file name, in this case, is initialized in a property for that declare page, then there is only one output file for each input file for this instantiation of the file listener.
Note that there is a requestor used for each file listener thread configured.