At each poll event, Watched Folder locks the input folder,
moves the files that match the include file pattern to the stage
folder, and then unlocks the input folder. Locking is needed so
that two threads do not pick up the same set of files and process
them twice. The chances of this happening increase with a small repeat
interval and a large batch size. After files are moved to the stage
folder, the input folder is unlocked so that other threads can scan
the folder. This step helps provide high throughput because other
threads can scan while one thread is processing the files.
After files are moved to the stage folder, invocation requests
are created for each file and the target service is invoked. There
may be cases where Watched Folder cannot recover the files in the
stage folder:
If the server goes down before Watched Folder can create
the invocation request, the files in the stage folder remain in
the stage folder and are not recovered.
If Watched Folder has successfully created the invocation
request for each of the files in the stage folder and the server
crashes, there are two behaviors based on the invocation type:
Synchronous: If Watched Folder is configured to invoke
the service synchronously, all the files in the stage folder remain
unprocessed in the stage folder.
Asynchronous: In this case, Watched Folder relies on the
Job Manager service. If the Job Manager Service calls back Watched
Folder, the files in the stage folder are moved to the preserve
or failure folder based on the results of the invocation. If the
Job Manager service does not call back Watched Folder, the files
will remain unprocessed in the stage folder. This situation happens
when Watched Folder is not running when the Job Manager calls back.
Recovering unprocessed source files in the stage folderWhen Watched Folder cannot process the source files in
the stage folder, you can recover the unprocessed files.
Restart the application server or node.
(Optional) Stop Watched Folder from processing new input
files. If you skip this step, it will be much harder to determine
which files are unprocessed in the stage folder. To prevent Watched
Folder from processing new input files, do one of the following
tasks:
In Applications and Services, change the Include
File Pattern parameter for the watched folder endpoint to something
that will not match any of the new input files (for example, enter NOMATCH).
Suspend the process that is creating new input files.
Wait
until LiveCycle recovers and processes all of the files. The majority
of the files should be recovered and any new input files processed
correctly. The length of time you wait for Watched Folder to recover
and process the files will depend on the length of the operation
to invoke and the number of files to recover.
Determine which files cannot be processed. If you waited
an appropriate amount of time and completed the previous step, and
there are still unprocessed files left in the stage folder, go to
the next step.
Note: You can look at the date and
time stamp of the files in the stage directory. Depending on the
number of files and normal processing time, you can determine which
files are old enough to be considered stuck.
Copy the unprocessed files from the stage directory to the
input directory.
If you prevented Watched Folder from processing new input
files in step 2, change the Include File Pattern to its previous
value or re-enable the process that you disabled.
|
|
|