File System Triggers

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Configuring Jobs > Managing Triggers >

File System Triggers

A file system trigger allows you to monitor a file or directory for changes such as newly added files or modified files (note that deleted files cannot be monitored). You can flexibly configure the directory polling interval (for example, every 60 seconds), and you can optionally set the start and expiry date of the trigger. You can also use wildcards to filter specific files of the directory.

 

The following screen shot illustrates a sample file system trigger.

ff_filesystem_trigger

Sample file system trigger

File system triggers have the following structure.

 

Check

Specifies how the trigger should poll the directory or file. Valid options:

 

Modified date

The trigger checks the last modification timestamp of all the specified files. If any dates have changed, or a new file has been added, the trigger fires.

Content

This option computes and stores a hash code for the specified file. After the polling interval has passed, the hash code is recomputed and compared to the stored value. If there is a difference, the trigger fires. Note that this can place considerable load on the server.

If any dates have changed, or a new file has been added, then the trigger also fires.

Polling interval

Specifies the frequency, in seconds, with which the directory will be polled.

Wait N seconds to settle

Defines the time in seconds that the server will wait before starting the next job.

Start

Defines the trigger's starting date and time. This is an optional field.

 

Clicking in the Date field opens a pop-up calendar from which you can select the start date.

Expires

Defines the date and time when the trigger expires.

Time zone

Defines the time zone applicable to the start and expiry date and time. The default time zone is defined in the server administration settings (see Setting the Default Time Zone).

Enabled

The enabled check box allows you to enable or disable the trigger. This option is useful when creating and testing new jobs.

 

The "triggerfile" parameter

Whenever you create a file system or HTTP trigger, FlowForce Server automatically adds a triggerfile input parameter to the job. When the job runs, FlowForce Server set this parameter to:

 

a) the file that triggered the job (in case of file system triggers)

b) the name of the temporary file that contains the downloaded content of the polled URI (in case of HTTP triggers).

 

ff-dir1ab

 

You can pass the value of the triggerfile parameter as input value in any subsequent steps of the job. This way, you can user or process the triggering file as required.

 

By default, the triggerfile parameter contains the absolute path of the triggering file. To extract portions of the path, use the file path expression functions.

 

For an example of a job that uses the triggerfile parameter, see Creating a Directory Polling Job.


© 2019 Altova GmbH