Text file adapter stops detecting new files
search cancel

Text file adapter stops detecting new files

book

Article ID: 140336

calendar_today

Updated On:

Products

CA Business Service Insight

Issue/Introduction

When using a text file adapter that has file patterns that are different, the text file adapter may stop recognizing some files as they are added to the directory, even though they may match the name pattern configured

For example, you have a name pattern configured for the following:

File-*.txt

The adapter is pointed to a directory with the following files

File-ABC0001.txt

File-ABC0002.txt

File-XYZ0001.txt

File-XYZ0002.txt

On the initial run, the adapter finds all four files.  The adapter then records that "File-XYZ0002.txt" was the last file it processed.

Later, a new file is added called File-ABC0003.txt, so that now the file listing in that directory is as follows

File-ABC0001.txt

File-ABC0002.txt

File-ABC0003.txt

File-XYZ0001.txt

File-XYZ0002.txt

However, the text file adapter never detects the new file in that directory

Environment

CA Business Service Insight 8.3.x and 9.x

Cause

This is due to the text file adapter believing that the File-XYZ0002.txt file is the newest file in the directory and it ignores the addition of File-ABC0003.txt

Resolution

Recommendation is to have two adapters, each configured to use more specific name patterns.  For the example above, the suggestion would be to have the following name patterns:

  • File-ABC*.txt
  • File-XYZ*.txt