Regent Fund Rule Sets and Scripting Tool
Overview
Within two different areas of Regent, clients with a Regent Fund license have the ability to create custom logic, via JavaScript scripts, that will replace or extend Regent’s base functionality. Rule Sets is located in Fund Setup and is used to create fund-level scripts that implement eligibility, awarding, and disbursement rules within the Regent packaging engine. Scripting Tool is accessed from the Regent Tools menu and is used to create scripts that extend core functionality in the packaging engine and to implement client-specific logic in other areas of the system.
Note: Rule Sets and Scripting Tool should not be utilized by clients prior to review of Regent’s forthcoming ‘Developer Guide for Regent Rule Sets and Scripting Tool’ which details how each function is to be used.
Rule Sets
In Fund Setup, when a fund is selected, a ‘Rule Sets’ tab is presented to users with ‘View Rule Sets’ permission (under Campus Setup permissions.) Users with an ‘Edit Rule Sets’ permission can add new rule sets or edit and delete existing rule sets.
A grid at the top of the Rule Sets page displays information about existing rule sets for the fund. When a rule set is selected from the grid, details for the rule set will display on the General subtab.
Rule Sets General Subtab
When adding a new rule set, or editing the General tab for an existing rule set, the following fields are presented. When a rule set record is edited, the ‘Reload RNA Setup’ button on Enterprise Setup must be clicked to apply the changes.
Field Name | Field Type | Options | Rules/Definition |
---|---|---|---|
Active | Checkbox |
| Indicates if the Rule Set is active. Inactive rule sets will not be executed. |
Module | Checkbox |
| Indicates if the Rule Set is an ES Module or plain JavaScript. Should be selected for all new Rule Sets. Plain JavaScript Rules Sets are deprecated. |
Name | Textbox |
| Required See Developer Guide for recommended naming conventions. |
Description | Textbox |
|
|
Extension Point | Dropdown |
| Required The event or place in code where users can extend Regents base functionality. |
Fund | Dropdown | All funds set up for the Institution | Required |
Effective Start Date | Date picker |
| Required Payment Period Start Date must be on or after configured Effective Start Date for rule set to apply for ‘Fund Award Amount Calculation’ and ‘Fund Eligibility’ Extension Points. Current Date must be on or after configured Effective Start Date for rule set to apply for ‘Disbursement Release’ and ‘Disbursement Scheduling’ Extension Points. |
Effective End Date | Date picker |
| Payment Period Start Date must be on or before configured Effective End Date for rule set to apply for ‘Fund Award Amount Calculation’ and ‘Fund Eligibility’ Extension Points. Current Date must be on or before configured Effective End Date for rule set to apply for ‘Disbursement Release’ and ‘Disbursement Scheduling’ Extension Points. Rule set remains in effect if no Effective End Date is entered. |
Script (In view mode) | Code Editor |
| JavaScript module |
Rule Sets Metadata Subtab
On the Metadata subtab, users can enter Name/Value pairs that will be used within the Script to control code behavior.
Scripting Tool
In Tools, users with ‘View Scripting Tool’ permission (Global permissions>Tools) will be presented with a menu option to view the Scripting Tool. Users with an ‘Edit Scripting Tool’ permission can add new scripts or edit and delete existing scripts in the tool. Scripting Tool functions similarly to Rule Sets but is NOT fund-specific and allows extension of base packaging behavior in Regent. The tool is comprised of two subpages: Extension Point Scripts and Library Scripts. Both subpages consist of a General and Metadata subtab.
Extension Point Scripts
The General and Metadata tabs of the Extension Point subpage of the Scripting Tool function the same as the General and Metadata subtabs for Rule Sets, described above, except Extension Point Scripts are not related to a fund, no effective dates are used, and the Extension Points options in the dropdown are different. See the Developer Guide for a list of available Extension Points in Scripting Tool.
An Extension Point Script is the code that will be executed at the selected Extension Point. An Extension Point is the event or place in code where users may extend Regents base functionality. Currently, Regent only supports packaging-based Extension Points. In the future, non-packaging Extension Points will be supported. Extension Point Scripts can be ECMAScript Modules or JavaScript scripts. JavaScript scripts will be deprecated in the future, and ECMAScript modules should always be used.
When an Extension Point Script record is edited, the ‘Reload RNA Setup’ button on Enterprise Setup must be clicked to apply the changes.
Library Scripts
Library scripts allow developers to organize and reuse code for better maintainability and reusability. Library Scripts can be used within Extension Point Scripts and within Rule Sets. Library scripts are always ECMAScript Modules (JavaScript Modules). Like Extension Point Scripts and Rule Sets, the Library Scripts subpage is comprised of General and Metadata subtabs.
The General subtab for Library Scripts has four fields: Active, Name, Description, and Code.
When a Library Script record is edited, the ‘Reload RNA Setup’ button on Enterprise Setup must be clicked to apply the changes.
Script Deployment
Rule Set Scripts, Extension Point Scripts, and Library Scripts should only be developed and tested in QA environments then promoted to Production. Changes should not be made directly in production environments. See Developer Guide for further information.