Rule Templates are used as specifications to gain inputs from users through dynamically generated fields, for creating business rules. A template group is a business domain level grouping. The definition of a template looks as follows.
The following parameters are configured:
Template Group basic data
The following parameters are configured under
|A name for the template group||Required|
|A uniquely identifiable ID for the template group||Required|
|A description for the template.||Optional|
Rule Template details
Multiple rule templates can be defined under a
templateGroup. For each
ruleTemplate, the following set of parameters need to be configured:
|A name for the rule template||Required|
|A uniquely identifiable ID for the rule template||Required|
|The type of the rule template. Possible values are as follows:||Required|
This specifies whether the business rule template can be used to create one business rule instance or many business rule instances.
Possible values are as follows:
The Java script to be executed on the templated fields.
Developers can use this script for:
The entered parameters should be templated in the script itself, and will be later replaced with their respective entered values.
Consider the following script
The derived value stored in
|A brief description of the rule template.||Optional|
These are the artifacts (i.e SiddhiApps) with templated parameters, that will be instantiated with replaced values when a business rule is created.
You can add a field name, description, default value and possible values (optional)
- Save the template group you created as a
.jsonfile in the
BusinessRulessection of the
<SP_HOME>/conf/dashboard/deployment.yamlfile, add a configuration for the template you created as shown below.