The Watched Folder service (WatchedFolder)
configures attributes that are common for all watched folder endpoints.
It also provides default values for watched folder endpoints. (See Configuring watched folder endpoints.) It is not invoked by external
client applications or used in processes created in Workbench.
The following settings are available for the Watched Folder service.
- Cron Expression:
- The cron expression as used by quartz to schedule the polling of
the input directory.
- Repeat Count:
- The number of times the input directory is polled. The default repeat
count to use if this value is not specified in the endpoint configuration.
A value of -1 indicates indefinite scanning of
the directory. The default value is -1.
- Repeat Interval:
- The default number if seconds between each poll. This value
is used as the repeat interval unless a different value is specified
in the watched folder endpoint configuration. The default value
is 5. See the description of the Batch Size setting
for additional information.
- Asynchronous:
- Identifies the invocation type as asynchronous or synchronous. Transient
and synchronous processes can only be invoked synchronously. The default
value is asynchronous.
- Wait Time:
- The default value for time, in seconds, after which the files
are retrieved from the input folders. If the file or folder is older
than the time specified in the wait time, it is picked up for processing.
The default value is 0.
- Batch Size:
- The default value for the number of files or folder that
are processed per scan. The default value is 2.
The
Repeat Interval and Batch Size settings determine how many files
Watched Folder picks up in every scan. Watched Folder uses a Quartz
thread pool to scan the input folder. The thread pool is shared
with other services. If the scan interval is small, the threads
scan the input folder often. If files are dropped frequently into
the watched folder, keep the scan interval small. If files are dropped
infrequently, use a larger scan interval so that the other services
can use the threads.
If there is a large volume of files being
dropped, make the batch size large. For example, if the service
invoked by the watched folder endpoint can process 700 files per
minute, and users drop files into the input folder at the same rate,
then setting the Batch Size to 350 and the Repeat Interval to 30
seconds will help Watched Folder performance without incurring the
cost of scanning the watched folder too often.
When files
are dropped into the watched folder, it lists the files in the input,
which can reduce performance if scanning is happening every second.
Increasing the scan interval can improve performance. If the volume
of files being dropped is small, adjust the Batch Size and Repeat
Interval accordingly. For example, if 10 files are dropped every
second, try setting the Repeat Interval to 1 second and the Batch
Size to 10.
In a cluster configuration, the batch size for
a watched folder endpoint does not scale to multiple cluster nodes.
For example, if the batch size is set to 2 for
a two-node cluster and the Throttle option is selected, the nodes
process files collectively in batches of two instead of each node
processing two files at a time.
- Overwrite Duplicate Filenames:
- A Boolean string that specifies whether the watched folder
overwrites duplicate result filenames and whether preserved documents
of the same name should be overwritten.
- Preserve Folder:
- The default value for the preserve folder. This folder is
used to copy the source files into in case of successful processing
of the input. This value can be an empty, relative, or absolute
path with a file pattern as described for the Result Folder setting.
- Failure Folder:
- The name of the folder where the failure files are copied.
This value can be an empty, relative, or absolute path with a file
pattern as described for the Result Folder setting.
- Result Folder:
- The default name for the result folder. This folder is used
to copy the results files into. This value can be an empty, relative,
or absolute path with the following file pattern.
%F = filename prefix
%E = filename extension
%Y = year (full)
%y = year (last two digits)
%M = month
%D = day of month
%d = day of year
%H = hour (24-hour clock)
%h = hour (12-hour clock)
%m = minute
%s = second
%l = millisecond
%R = random number (from 0 through 9)
%P = process or job id
For example, if it
is 8 PM on July 17, 2009 and you specify C:/Test/WF0/failure/%Y/%M/%D/%H/,
the result folder is C:/Test/WF0/failure/2009/07/17/20.
If
the path is not absolute but relative, the folder is created inside
the watched folder. For more information about file patterns, see About file patterns.
Note: The smaller the size
of the result folders, the better Watched Folder performance will
be. For example, if the estimated load for the watched folder is
1000 files every hour, try a pattern like result/%Y%M%D%H so
that a new subfolder is created every hour. If the load is smaller
(for example, 1000 files per day), you could use a pattern like result/%Y%M%D.
- Stage Folder:
- The default name for the stage folder inside the watched
folder.
- Input Folder:
- The default name for the input folder inside the watched
folder.
- Preserve On Failure:
- If true, original files are preserved in the failure folder
on failure.
- Throttle:
- When this option is selected, it limits the number of watched
folder jobs that LiveCycle processes at any given time. The Batch
Size value determines the maximum number of jobs (See About throttling).
|
|
|