Folder watching

Watching jobs require Express connector profiles that use only such Document Services and Extenders that do not involve end-user interaction. Before you start watching setup, it is recommended that you have such Express connector profiles ready. If you are in doubt about your connector profile, document service and/or extender, it is recommended that you check its icon on top of the configuration page and review your setup in the Administration Console Simulator.

  • Once you have assigned an Express connector profile to a watching job, you cannot change it into a non-Express one.
  • Folder Watcher configurations can use a dedicated user account to access the watched folder. If the password for this user account changes, then the authentication attempt will fail the next time when the Folder Watcher tries to access the watched folder. To avoid locking out the user account, the watcher becomes automatically disabled in this case therefore the watcher will not perform any additional authentication until it is activated again manually (after updating the specified password in the Administration Console). This mechanism is therefore used to avoid locking out the user when the password changes. However, this solution does not protect the user account from becoming locked if several watchers use the same user credential to access the folders. In this case, all watchers will try to authenticate with the user credential once before they realize that the credential is not valid. As a result of this, the user account gets locked. To avoid this problem, the user must deactivate all watchers manually before changing the password in Active Directory. After this, the password must be changed in the Administration Console as well and the watchers must be reactivated only afterwards.

Start the folder watch setup wizard from the following locations in the ShareScan Administration Console:

  • Click Watch folder in the Watching pane on the Devices tab.
  • Click Set up watching on the Home tab and select Watch folder from the button list.
  • Right-click on the Watching pane and choose Add Watch folder from the menu.

The New watcher - New Rulewizard starts.

On the first panel you can Set watching basics.

  1. Set Watcher name: This field is mandatory.
  2. Set Processing order:
    • Parallel: When selecting this option, the files in the Watch folder are processed in parallel. Processing a file that is put in the Watch folder later can be finished earlier than processing a file put in the Watch folder earlier.
    • First in, First out (FIFO): When selecting this option, the files in the Watch folder are processed one after another. Processing the next file in the Watch folder is started by the same folder watcher only if the processing of the previous file has been finished.

      Selecting the next file to be processed is based on its creation time.

      The FIFO processing order of files can only be guaranteed if the file creation time is set by the system to the current time when the file is dropped into the Watch folder. Therefore, it must ensure that either the Watch folder as target location is accessed with UNC path when the file is dropped into the folder by any mechanism or this mechanism must copy and not move the file into the Watch folder as target location.

  3. Set Folder Watching Settings:
    • Watch Folder: A shared network folder in the format \\localhost\outputfolder or a shared local folder as long as you use its UNC path. The user configured in Step 3 for Network Credentials have full access to this folder: create files, move and delete files, create subfolders. Watching a folder shared on a workgroup computer is not supported.
    • Subfolder watching: Choose to monitor only the Watch Folder or its subfolders as well
    • Wait for jobs to start (seconds): Completion delay defining how much time the manager waits before picking up the file. It is recommended to set this higher than the default zero in such a case when your device creates multi-page output files by creating a single-page one first and then adds pages to it. A zero second value might cause the watcher service to start processing this file even before it is ready.
  4. Set Network Credentials:
    • User ID: User name of the account to access the Watch Folder
    • Password: Password of the account to access the Watch Folder
    • Domain: Domain of the account to access the Watch Folder
  5. Specify Work Folder Settings:
    1. Type
      • One for each watch folder: each watcher uses its own working folder
      • Shared: each watcher uses the same working folder
    2. Name: relative or absolute path of the work folder; work folder and watch folder must be on the same root path.
      The ShareScan Manager service user must have permissions to move a file from this folder to its work folder. Work folders for obsolete watchers have to be deleted manually when no longer in use.
  6. Click Next or Schedule watching to continue.

The Schedule watching panel is displayed.

  1. Specify the following settings:
    1. Scheduling interval (s): how often search for input files should run
    2. Scheduling from: starting time of scheduling
    3. Scheduling to: end time of scheduling. Note that a maximum period of 1 day (23:59) can be set as scheduling interval
  2. Click Next or Set processing rules to continue.

The Set processing rules panel is displayed. Specify the following settings:

  1. Set Rule name: This field is mandatory.
  2. Set Priority: provide a value between 1 to 5 to manage potential conflicts between rules watching the same folder with overlapping filters (for instance, two rules that both take PDF files as input). In such cases the higher priority rule processes the input file. The highest priority value is 1. It is strongly recommended that you use different priority settings for your potentially conflicting rules.
  3. Select the processing mode:
    1. Process as (scanned) images: This mode processes incoming files as if they are all actual scans - that is, all scanning-related operations and transformations (for instance deskew, OCR, bates stamping, and so on) set in the assigned connector profile are carried out on them. Pages processed as (scanned) images are included in the total page count.
    2. Route to destination without processing: Use this mode if you want to pass your files to their destinations without processing and/or transformation. (Your scans will be stored in their native file format). Routing renames the files. To apply new naming, use Advanced File Naming (under Document Naming Option in the assigned connector profile).
  4. For either option, you can assign the file types to be handled by the rule. Simply mark the extensions you want to be handled by your rule.

    To modify your list of choices, click the Edit button to reach the file type editing dialog. Select/clear file types as needed and confirm your choice with any of the following buttons:

    1. Add: Type the extension into the field, and click this button.
    2. Remove Selected: Mark the extensions to be removed from the list and click this button. You can remove any of the factory default supplied extensions as well as the ones you have added.
    3. Cancel: Discard changes.
    4. Save & Close: Confirm your updates and return to the wizard panel.
  5. Click Next or Add more filters to continue.

The Additional filtering panel is shown.

  1. Use these options only if you want to include or exclude files with specific names. Your options are:
    1. Only include files named
    2. Exclude files named

      Name filters must be in the format filtername*.

  2. Click Next or Associate with a profile to proceed.

In the next panel, you can associate an Express connector profile with the watch folder. This will process the incoming files. Please note that it can use only such Document Services that do not involve end-user interaction.

  1. Select a connector profile.
  2. Click Next or Set post-processing options to proceed.

In this panel you can configure the following:

  1. Set Rule owner: this is the person to whom the rule is assigned. To set up multiple owners, list them separated by semicolons, in the domain\user format.

    When you specify the Rule owner, take extra caution that you type in an Active Directory user correctly.

  2. Configure the Send notification to option, if applicable: provide notification email address.
  3. Choose what type of notification email to receive:
    • On successful processing
    • On failed processing
  4. Set what happens to processed files - configure the Processed files will be: option as follows:
    • Deleted: files are deleted after processing
    • Moved to: files are moved to a specified folder, or kept in the watch folder. This folder must be accessible to the account running the watcher service.
  5. Set what happens to failed jobs; Configure Move failed jobs to option: ;browse for a folder where failed jobs will be stored. This folder must be accessible to the account running the watcher service.
  6. Click Next to proceed.
  7. Review the full summary of your rule and click GO! to apply the rule.

ShareScan maintains a separate work folder for storing non-watcher jobs under %programdata%\Kofax\ShareScan\ScannedFiles. By default, all jobs are stored in this folder, whether successful or not.

Watcher jobs, whose successful creation was interrupted by any means, are also stored in this folder:

  • User pressed Cancel on the device or cancelled the job via Job Monitor: the canceled job's folder is deleted immediately from the work folder, it cannot be recovered.
  • User pressed Next/Finish on the device: if the job completed without errors then the job’s folder is deleted immediately (unless the DoNotRemoveTempFolder advanced setting is enabled) otherwise it is stored in the work folder for a period specified in RetainJobDataInterval advanced ShareScan setting.
  • Job could not be finished due to technical reasons (interrupted network connection, insufficient storage space, and so on): the failed/stuck (active) canceled job's folder is stored in the work folder for a period specified in RetainJobDataInterval advanced ShareScan setting.

Failed watcher jobs can also be stored in a separate place, other than the default work folder: mark the Move failed jobs to: check box in the Set post-processing options of the New Watcher / New Rule window when setting up a watcher job. Click the Browse for folder (...) button and select a folder for the failed watcher jobs. These failed jobs can be downloaded via Job Monitor.

Recommendations

To achieve failover capabilities and load balancing benefits, it is recommended to employ more than one watcher monitoring the same folder. In such cases the only supported configuration is that these watchers run on different ShareScan Managers, and these Managers use the same database.

If you have several watch folders on the same file share with different watchers for each, it is strongly recommended that these watchers use the same user credentials for access. In case the different watchers have to use different user credentials, it is recommended to have them running on distinct ShareScan Managers.