DocOrigin FolderMonitor is an automation application that runs as a background task waiting for "submitted" data or tasks to perform. Data is submitted by writing a file into a FolderMonitor "queue", which is a continuously watched folder. When files appear in a queue, FolderMonitor will process each file one at a time; it will determine the processing that is required for that data and execute a nominated JavaScript script to do the processing.

Processing can consist of a wide variety of actions. In the simplest case, the data can be passed on to DocOrigin Merge where a document is generated. More complex processing may include reading and modifying the data, creating intermediate documents, and sending emails with attached documents. FolderMonitor can also call or run any external application, allowing easy integration with non-DocOrigin processes, such as archiving.

Each instance of FolderMonitor can be configured to monitor several queues, which facilitates prioritized queues. Multiple instances of FolderMonitor can be run concurrently, and each instance can process multiple jobs in parallel.

FolderMonitor is available on all DocOrigin platforms: Windows, Linux, AIX®, and IBM i (Contact your distributor for details). On Windows, an additional GUI called DocOrigin FolderMonitorConsole is available to simplify the starting and stopping of FolderMonitor instances.

Processing Jobs

FolderMonitor is fed data files from client applications. The files must be written into queues identified in the FolderMonitor configuration. Each file is considered a "job". When a file appears in a queue, FolderMonitor will read the file and process it in two steps:

  1. A job "discovery" script is run. This script can examine the actual data to determine what type of action is required. This script assigns a job name to the file. For example, by looking at the data stream the script may determine that this is an "Invoice" job, or a "Purchase Order" job.

  2. A "processing" script is run. The script file name is the job name assigned by the first step. For example, if the job name is determined to be "abc", FolderMonitor processes the job with a script called abc.wjs. This allows a fairly simple script to determine the type of file, and therefore, the processing to apply. This then leads to running job-specific scripts for each job type. These scripts are typically very small but if the need ever arises the full power of the DocOrigin extented JavaScript engine is available to orchestrate more complex multi-step processing flows.

Through these scripts, FolderMonitor can access Merge, send emails, convert the data, and so on. If errors are encountered, the data file will be retained in an Error folder for examination and remedial action. On Windows, the FolderMonitorConsole program can be used to start and stop the FolderMonitor service.

Managing the Process

A number of features are built into FolderMonitor to simplify the management of jobs and the diagnosis of potential problems.

FolderMonitor, like other DocOrigin components, creates a standard log file of all transactions as they occur. When FolderMonitor calls other DocOrigin components such as Merge, a job identifier is passed to that component so that log file entries can be quickly reconciled in the event of a problem. Merge will log its status information in the same log file as FolderMonitor, creating a convenient process log across multiple applications.

FolderMonitor can be configured to send an alert email message or text message when errors of a certain severity are detected.


contact us at
© 2007-2017 Eclipse Corporation WSL Inc. — All Rights Reserved