Create File Monitors to detect and pick up files, and ultimately initiate a Business Process (through an Event).
- Select File | New | File Monitor from the main menu bar. The New File Monitor window appears.
- Provide the Source folder, Package, and Name.
- Click Finish. An editor appears.
You can also use the Wizard to create this object. Click New to select the object.
Defining this object indicates the target directory, related filters, monitor frequency, archive and collision error settings, and the Event to be launched upon file detection.
- Under the Monitor Details section, type the URL location in the Target Directory field. This instructs the object where to look for the file. You can also paste, or use the browsing buttons (by directory, or Global Variable). An example IP Address is: 123.456.789.0. An example URL is: ftp.myco.com.
Note: If there are sub-folders included within the target folder, select the Recurse directories checkbox if you wish to allow the monitor to include them under its scope of detection.
- Type the files (or file types) to be monitored in the File Name Filter field. Use *.* to include all files, such as xml, .txt, and .csv files. Clarify supports all regex syntax.
- Select how often the File Monitor should check the Target Directory in the Polling Interval field. Options include seconds, minutes, hours, and days.
- Select or create the Event that the File Monitor will launch. Place your cursor in the Event field and select from a list of existing Events. To create an Event, click the hyperlinked Eventfield label.
- To enable the File Monitor to automatically start whenever the Clarify Server starts (eliminating the need for a manual start), select the Run as service checkbox.
Not selecting this requires you to manually start the File Monitor from Admin Console | Resource Monitors. Generally, you would select this once you've tested in the Local Test server. For more information, see Starting File Monitors.Note: A File Monitor not selected to run as service does not necessarily mean that it won’t start when a Server restarts. File Monitors maintain their status from the point of the previous server shutdown or restart. So if a monitor was running at the time of server restart, it will continue running.
Consider this example:
You have two file monitors: FM1 and FM2. Only FM1 is set to run as service. Both monitors have a status of STARTED.
The server is gracefully shutdown and then restarted. The results are:
But if both monitors had a status of STOPPED when the server shutdown, then upon restart their status would be:
- Under the Archiving section, type the URL location of the Archive Directory. This instructs the File Monitor where to archive the file(s). Options include:
- Type a file name or click the Browse button to select one.
- Click the Global Variable button to select a Global Variable.
- Create a Substitution Variable; Clarify will generate a file name based on the variable.
- To rename the file when it moves it to the archive folder, select the Rename file checkbox and type a name in the New Name field. You can also paste, or use the same browsing buttons.
- Select the Collision Action for Clarify to take should a file collision occur.
- Overwrite: Write over the existing data in the file.
- Append: Open the original file and add the new data after the old data.
- Generate Unique Name: Create a new file to house the data. This file name will have the original file name plus a random letter/number combination appended.