Administration Guide : More Details about Triggers and Actions : Some details about Trigger Sets

Some details about Trigger Sets
Triggers and Actions depend upon the idea that a change in the Xinet database or an Event within the File System has the power to initiate an Action (or series of Actions), such as transferring a file, printing a file, etc. This provides a flexible and powerful opportunity to build many specific workflows. The following provides an overview of Date and Value Triggers and Actions.
.Overview of how File System Event Triggers and Actions work
As is briefly covered in Trigger Set Configuration, there are three types of triggers: file Event Triggers, Date Triggers and Value Triggers.
A File Event Trigger runs Actions upon changes to a file inside an Active Path. The changes, which all effect a file’s history, include downloading a high-resolution version of the file, downloading an FPO version of a file, uploading a new file, downloading a Custom Image Order, or moving a file into a watched path. You can tie any of these changes, as long as they occur within an Active Path, to a Trigger Set with specified Actions.
Date Triggers and Value Triggers differ, in that a change in value of some piece of metadata must occur. Though the mechanism for activating these two trigger types is slightly different, both require that a specific condition be satisfied to execute actions. Date Triggers meet their conditions when the current time reaches the period specified within the Action, for example “30 minutes before the value of a date field.”
Value Triggers meet conditions through changes to values within data fields. With each change to a database value via Xinet, these changes are verified against the configured Trigger Sets. First, Xinet checks whether any Trigger Sets are active for the file-system path for the changed file. If Xinet finds that there is a Trigger Set corresponding to the file-system path, it then compares the change that occurred to any that might initiate actions in that Trigger Set. Then, if there is a Trigger Rule that should be initiated by the value change, Xinet executes in sequential order the Actions associated with that Trigger Rule.
Date Triggers also test whether any Rules should invoke Actions whenever values of date fields are set. However, any Actions that should be run some time in the future (when the correct time is reached) are added to a list in the database to be executed at the correct time. When the condition is met (the time arrives), Xinet executes the Trigger Rule Actions.
Xinet executes Actions using some information from the environment; it may provide other information using “arguments.” Both standard arguments, discussed below, and custom arguments are possible. Please note that custom arguments must always be named arg0, arg1, arg2 and so on. These are the only legal names for custom arguments to be used with Actions. Any other argument names will be ignored.
The following example shows how you might execute the copy Action with arguments. These should be typed on a single line.
On Unix systems:
/usr/etc/webnative/actions/copy/copy -f /path/to/file -arg0
/path/to/destination -arg1 <O/A/F>
On Windows systems:
Program Files\Xinet\WebNative\Bin\actions\copy\copy.bat -f
/path/to/file -arg0 /path/to/destination -arg1 <O/A/F>