1. DIR_WATCHER.bcl Overview

About this task

DIR_WATCHER.bcl manages incoming .xml source files for the POMS system and triggers POMS processing of those files.


  1. XMLT:
    1. Converts legacy data into an .xml format file with a pre-defined schema.
    2. Places the .xml file in a remote directory.
  2. DIR_WATCHER.bcl looks for a file specified by a point, XML.XMLT_DUMP, located under the site root directory,  and copies it into another directory where the POMS order validation routine can process.

    The directory where this file is copied by the DIR_WATCHER.bcl  is determined by the value of another point, XML.SOURCE.

    Another point, XML.ROOT, configures the path name of the root directory where the Directory Watcher looks for both the source and destination directories.

    The Directory Watcher script is automatically executed on a timed-basis by the CIMPLICITY Event Manager associated with your POMS-based project.

  3. By default, every 10 minutes, the DIR_WATCHER.bcl:
    • Copies a file from the XML.DUMP directory to the directory specified by XML.SOURCE and
    • Triggers the $OMV_ORDER site in POMS for processing.

    You can change the default for how often DIR_WATCHER.bcl runs, using the CIMPLICTY Event Editor.

    Note: The name of the file that $OMV_ORDER would process is dynamically set in another point, XML.PROCESSING_FILE, by the DIR_WATCHER.bcl script.

    $OMV_ORDER validates files placed in the XML.SOURCE directory using the schema file specified in the point  XML.SCHEMA_NAME.

    Invalid $OMV_ORDER rejects the file and moves it to Rejected directory, located in the directory  site_root\POMS\TBNG_POMS\OrderFiles directory.
    Valid POMS processing of accepted files then begins.
  4. The CIMPLICITY Event Manager executes DIR_WATCHER.bcl on a timed basis. The file paths used are stored in CIMPLICITY points.


    • Copies files from the specified source directory in chronological order to the POMS input directory.
    • Ensures that all files have both completed downloading and have unique filenames.

    When all available files have been copied over, the Directory Watcher:

    • Removes copied files from the source directory and
    • Triggers the POMS input to RCO via a point (OMV_ORDER_T) update.