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 rules derived from the template can be deployed only on one node, or whether they can be deployed on many nodes.
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.
If you add this configuration, the business rules template is deployed only in the specified nodes when you run the worker and dashboard servers of your SP setup. If you do not add this configuration, the template is deployed in all the worker nodes of your SP set up.