Where conditions are placed within the Rule pane when they are added depends on which item is selected in the Rule pane.
When the Event Rule (Used to specify an action to occur when an event takes place and/or a condition is present, e.g., send an e-mail when a file is uploaded.)Trigger (the very first item in the Rule pane) is selected and a Condition (Allows you narrow the trigger definition for an Event Rule. Conditions are optional; you do not have to define a condition on an Event Rule to make it trigger an action, but they allow more control over when an Action can take place.) is added, the condition is placed directly beneath the Event Rule Trigger. This is considered a "root" level condition.
ON FILE UPLOAD
{
if ( %FS.FILE_NAME% = "*.pgp" ) //a root level condition. No action added yet
{
}
}
When an action inside another condition is the selected item and a new condition is added, that new condition is placed directly beneath the action and to the left, or outside of the container condition. Otherwise, it would become a nested condition, which EFT Server does not support.
ON FILE UPLOAD
{
if ( %FS.FILE_NAME% = "*.pgp" )
{
PGP Decrypt %FS.FILE_PATH%
}
if ( %FS.FILE_NAME% = "" ) //new condition added placed at root level
{
}
}
When an action (that is not contained within a condition) is the selected item, and a new condition is added, the new condition is placed immediately beneath that action, at the same root level (see above example).
When a condition is the currently selected item and another condition is added, the new condition is ANDed to the selected condition. If the condition being added is the same condition as the one selected, the new condition is ORed to the selected condition. Using this method, you can create compound conditions.
ON FILE UPLOAD
{
if (%FS.FILE_NAME% = "*.pgp" ) AND (%FS.FILE_SIZE% <300,000b) //a compound condition
{
PGP Decrypt %FS.FILE_PATH%
}
}
Adding a Condition to an Event Rule