Show TOC

Rule Editor IntroductionLocate this document in the navigation structure

Rule definitions within an Agentry application project are added to the module, and defined using the Rule Editor.

The Rule Editor provided with Agentry Editor is a tool used to define the rule logic. It includes several tools and features to aid in logic definition, including:
  • Functions are presented with fields for each parameter to the function, with appropriate indicators for optional and required parameters, as well as the data type of the parameter.
  • On-line help for each rule function term, including short and long descriptions of the function and descriptions of each function parameter displayed in the Rule Editor for each item as it is used.
  • Test functionality providing the ability to test rules within the rule editor by providing test data for function parameters and viewing the return from the rule based on such values.
  • Real-time rule structure validation and context information for the rule as a whole and each of its terms.
  • Navigation items to make the different rule terms more readily accessible.
Overview of the Rule Editor

Following is an example of the Rule Editor. It displays a simple initial value rule that generates local ID’s for new object instances created on the Agentry Client.

On the left of this screen there is a list of all items that may be added as rule terms. The various tabs allow for the selection of actions, functions, globals, properties, screen sets, and sub-rules. Selecting one of these tabs will then list the items of that type. When functions are selected a drop down list is displayed to allow the developer to select the function category, which will list only those functions within that category. There is also the option to list all functions.

The main center portion of the screen displays the function currently being added or modified. Included here is the short description of the function, as well as fields for each of the function’s parameters. Selecting a parameter field will display the description of that parameter above the parameters list.

To the right of the parameters list are shortcut buttons. These buttons allow for adding the same terms as the list on the left. When the shortcut button is selected, a menu is displayed with the items of that type. In addition is a button to include a JavaScript term. This should only be used with the JAVASCRIPT function and is provided to allow for the entry of JavaScript in a multi-line editable text box.

Below the list of field parameters is the Rule Test Results section, which may be expanded or collapsed (expanded in the example). This section can be used to test the results of the rule by specifying test values for various terms within the rule.

To the right of the screen is the Structure view for the rule. This displays the entire rule structure. For developers familiar with the rule editor in previous releases of Agentry, this view presents the rule and allows for the same functionality. Within this structure view, the rule terms may be added, edited, deleted, or dragged and dropped to different positions within the structure.