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