When you create a job, you must specify conditions (or criteria) that will trigger the job. These conditions are known as triggers. FlowForce Server monitors any defined triggers and executes the job whenever the trigger condition is met.
You can create multiple triggers for the same job and enable or disable any of the defined triggers. Whenever any of the enabled triggers fires, FlowForce Server executes all steps of the job. If you use triggers in jobs that have parameters, all parameters must have default values; otherwise, the job will not be executed. The following types of triggers are available in FlowForce Server:
•Timer triggers allow you to schedule jobs to start at a specific time and run for a specific time interval. Time triggers can be set to run daily, weekly, on specific days of the week or month.
•File system triggers start jobs when there is a change in a file or folder. Note that deleted files cannot be monitored. You can configure the directory polling interval (e.g., every 60 seconds) and optionally set the start and expiry date of the trigger. You can also use wildcards to filter specific files of the directory.
•HTTP triggers enable you to poll a URI for changes. Specifically, you can poll the Last-Modified and Content-MD5 HTTP header fields for changes. You can configure the polling interval (e.g, every 60 seconds) and optionally set the start and expiry date of the trigger.
Add a trigger
To add a trigger, click the button corresponding to the trigger type you are interested in.
Some trigger fields have the and buttons displayed next to them (e.g., the start date of a timer trigger). Use these buttons to set or clear the value of the trigger field. The image below shows that the value of Repeat is not set, while the value of Start is set to 2016-03-29 00:00:00. You must save the job so that the trigger values take effect.
Manage a trigger
Use the buttons to the right of a trigger to manage the trigger (see below).
Delete a trigger.
Duplicate a trigger.
Undo the previous delete action.
The triggerfile parameter
Whenever you create a file system or HTTP trigger, FlowForce Server automatically adds a triggerfile input parameter to the job (see screenshot below). When the job runs, FlowForce Server sets this parameter to the file that triggers the job (file system triggers) and the name of the temporary file that contains the downloaded content of the polled URI (HTTP triggers).
You can pass the value of the triggerfile parameter as an input value in any subsequent steps of the job. This way, you can use 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. See an example of a job that uses the triggerfile parameter in Creating a Directory Polling Job.