Script Operations Flow
Agiloft runs scripts in response to some events as defined by Rules specification. Events are always associated with a record from a table and a user action that actually triggered this event. Here is a list of possible events and the order of the resulting actions:
Record created/removed/modified through the GUIuser record: a record that has been created/removed/modified and matched our filter.
user action: user record creation/removal/modification.
The order of operations is:
- Validation is performed on the record at the browser level, for example to confirm that the user has provided value for all required fields.
The validity of changes made by the user is checked based on group permissions.
Note: This is an important security feature. Although Agiloft only sends to the browser the fields that the user is permitted to see and only displays the fields for which the user has edit permissions, a hacker might construct their own http stream by hand in an attempt to circumvent this protection. If any of the changes are invalid, the record update is cancelled and an error message is displayed.
- If the user has changed the workflow state, any associated scripts are called. These scripts may modify fields in the record and act with absolute authority. In other words, they may set field values that the user would not be allowed to set based on his group permissions.
- The record may trigger business rules that execute automatic actions and any associated scripts. The order in which the business rules are checked is based upon the Priority field in each rule, so if a business rule with high Priority modifies the record, a rule with lower priority will look at the modified record before deciding whether or not it should execute.
Summary based: number of user records matching given filter [operator][threshold], where operator is one of <, >, <=, >=, = and threshold is a number.
user record: all records meeting the filter. User can tell Agiloft to run actions either for all matching records, or only for one of them (see rule settings).
user action: user record creation/removal/modification after which number of matching records exceeded the threshold.
Timer based: periodically executed summary, number of records matching the filter>0.
user record: the same as in summary based.
user action: undefined.