The Rule Template Editor
Comparing similar sections of the Rule Template editor and the Rule editor highlights the unique features of rule templates.
Configuration Section
The Configuration section is the same as the Configuration section in a rule. Priority, ranking, and forward chaining features work the same at runtime whether a rule is created using the Rule Editor or the Rule Template Editor.
Declarations and Variables Section
The Declarations and Variables section (declare in the source view) is similar to the Declaration section of a rule. However, in rule templates you can declare primitive types (as you can in rule functions). You can also define initial expressions for primitive types, for example, int j = 50;.
Pre-conditions Section
The Pre-conditions section (when in the source view) is similar to the Conditions section of a rule. However, WebStudio users can add additional conditions when defining individual business rules. The Pre-conditions section specifies conditions that must be met in all instances of a rule template before the rule’s actions execute.
This feature enables complex calculations to be done before the definition of the condition. The Pre-conditions section could also contain conditions that might appear in any rule, such as the following:
con.prop1 > con2.prop1;
- Action Context Section
The Action Context section (actionContext in the source view) has a similar purpose to the Actions section of a rule. - Bindings Tab
The form editor for rule templates provides an additional tab, the Bindings tab, with two sections that are not found in the Rule editor: Bindings and Views (bindings and views in the source view). - Tips for Working in the Rule Editor
Here are some tips for working with the Rule Editor - Rule Template Views
A rule template view defines a visual presentation of the rule template to make it easy for the WebStudio user to define a business rule.