Overview
JSCAPE MFT Server provides a very powerful feature that allows users to define a function that listens to events occurring within the server and execute actions when certain conditions related to these events are met. This functionality is called a trigger.
JSCAPE MFT Server provides a comprehensive set of predefined events and actions that let’s you define triggers, which can automate trivial as well very complex tasks. From as simple as renaming the filename of a just received file to decrypting PGP encrypted files or downloading/uploading files from/to your trading partner’s server.
The ability to compound conditions and specify multiple actions within a single trigger allows one to define very powerful, precise functionalities.
What Are Events?
Events are the things that occur throughout the course of a server’s runtime. Events like a user login/logout or a file upload being started. JSCAPE MFT Server exposes a comprehensive set of these events. These predefined events form the bases of a trigger definition.
What Are Event Properties?
Events have named properties that can be tested and used within actions. Each event has their own relevant set of named properties as well as properties that are common to all events. As an example, the “File Upload” event has a property named “Bytes” which is the size of the uploaded file and the “IP Blocked” event has a property named “IP” which correspond to the IP address just blocked. Example of common properties is “DomainName”, which is the name of the domain where the event occurred. Also common are the various date and time related properties corresponding to the data and time when the event occurred.
What Are Conditions?
Conditions are the criteria that must be met before actions defined within a trigger can be executed. Conditions are specified against named properties of an event. They can be compounded using “AND” and “OR” expression to form complex criteria.
What Are Actions?
Actions are predefined functions that get executed when all conditions specified on a trigger are met. JSCAPE MFT Server provides a comprehensive set of actions for use in a trigger. A trigger may be defined with multiple actions.
Custom actions can also be created by writing a Java class that extends the com.jscape.inet.mft.workflow.AbstractAction class within the JSCAPE Secure FTP Server Management API. See reference below.
Defining A Trigger
Open JSCAPE MFT Server and click on “Triggers” under the domain you want to manage. Then click on the “Add” button to get to the “New Trigger Wizard” screen.
Name - A unique name identifying the trigger.
Event Type - The type of event you want to listen for.
Description - Description of this trigger.
Enabled - Enables/disables trigger. By default this is checked.
Fire Trigger Error event if error occurs - If an error occurs while executing any of the actions associated with this trigger, a Trigger Error event will be raised. You may capture this event using a trigger that listens for the Trigger Error event and respond appropriately.
Click on the “Next >>” button to get to the “Trigger Condition” screen where you can specify the conditions to be met.
Condition Tree - Binary expression tree which lists all currently defined conditions. It has a root node with other internal nodes that are junctions (AND/OR statements) and leaf nodes that are constraints.
Condition - Text representation of the condition tree along with interface for managing junctions and leaf node constraints.
Update button - Updates condition tree with currently selected condition.
Clear button - Clears condition tree resulting in a single root node of true, indicating that this trigger will always evaluate to true and that all associated actions will be executed.
Test expression - Displays a "Test condition" dialog that allows you to enter sample values to test against your condition tree.
Click on the “Next >>” button to get to the “Trigger Action” screen where you can specify the actions that will be executed when the conditions are met.
Then click on the “Add” button to get to the “New Action” screen where you can choose an action to add
Different set of options appears depending on the action chosen. You may add multiple actions. The “Add Variable” let’s you choose a named property to use within the action. The properties listed are relevant to the event that is the bases of the trigger. The “Add Function” button let’s you choose a function that could be used to manipulate properties before being passed as parameters to actions.
Click on “OK” button to create the trigger.
Using Time Based Triggers
JSCAPE Secure FTP Server includes the “Current Time” event that you could listen to and could form the bases of a scheduler that allows you to execute actions on a recurring basis much like a cron job.
Summary
Triggers are perhaps JSCAPE MFT Server’s most powerful feature. It provides you the ability to augment and tailor the server’s functionality to meet your particular need. Please check the references below to see more details.
References
Trigger management
Event Types
Action Types
Function Types
Defining custom action types
Comments