File Trigger

Introduction

The file watcher trigger scans a folder looking for changes to files. Changes can be: - A file contents changes - A new file was created or saved into the watched folder.

A file trigger will ‘trigger’ when it detects one of the above changes while the trigger is enabled.

You can use a file trigger to build workflows that start when a file is created or modified on the PayGate server.

A file trigger will ignore files it has previously ‘seen’ which avoids inadvertently processing duplicate files.

It can take up to one minute for Paygate to detect a new or change file.

Settings

Enabled

Determines whether the trigger is enabled or not. A trigger that is not enabled with never execute any bound workflows.

Supress on BACS non-working days

If enabled a trigger will not run any bound workflows if the trigger event occurs on a BACS non-processing day. Bacs non processing days are weekends and UK (English) bank holidays.

Quiet time

You may set a trigger for evey hour but you might not want it to run 24 hours. You may only want the trigger to execute workflows during, say, business hours. Setting a Cron quiet time can help wi this. By setting a start and end time, you can suppress a trigger from executing workflows during those times. For example, setting a start time of 19:00 and an end time of 0700, you can disable the cron trigger from 7pm to 7am. The cron trigger will function normally outside of those hours (7am to 7pm).

Quiet Time

In the above configuration, the cron trigger will start executing bound workflows from 07:01.

Bound Workflows

Bound workflows are the Paygate workflows that the trigger will execute when it fires. It is best practise to have one bound workflow per trigger but a maximum of three bound workflow can be used.

Add bind a workflow tot he trigger, click the + button. A picker will appear show all workflows for you organisations. Select a workflow from the list and click select. You will now see the selected workflow in the list of bound workflows:

Bound Workflows

By default the workflow is enabled - note the blue tick on the left hand side. You can enable or disable the individual workflows in the bound workflows list. When a workflow is disabled, it will not execute even when the trigger fires.

The cog icon is a shortcut to editing the bound workflow.

The trash icon will remove (unbind) the workflow from the bound workflows list. The workflow itself will not be affected by unbinding.

View Telemetry

The View Telemetry button is a shortcut the the telemetry page. This page shows all workflow executions for this particular trigger. You can drill down into the individual logs by clicking any of the rows in the table.

Clone Trigger

Cloning a trigger will create a new trigger based on the original. Most of the original configuration is move to the clonned trigegr with a few exceptions:

Save the oginal trigger to ensure all the configuration is clonned.

On clicking Clone Trigger a popup will appear suggesting a name for the trigger. This can be ammedned as required but each trigger must have a unique name.

Clicking Yes! will clone the trigger and take you to the Trigger table. The newly clonned trigger ois now independent of the original and can be edited or clonned.

Notes

Is a file change occurs while he trigger is disabled, the trigger will not fire when re-enabled.