Configuring Business Rule Deployment
WSO2 Business Rules Manager uses ruleTemplates within templateGroups, to derive business rules from. Each ruleTemplate will have a UUID - that is used to uniquely identify itself. When a ruleTemplate is specified under a worker node; SiddhiApps derived in business rules created out of that ruleTemplate will be deployed in the specified worker node.
- Open theÂ
deployment.yaml
 file in the<WSO2SP_HOME>/conf/dashboard
directory. Deployment configurations for the Business Rules Manager are specified underÂ
wso2.business.rules.manager
. Provide the URL(s) of worker node(s) that is/are available to deploy SiddhiApps, underÂdeployment_configs
 in theÂ<HOST_NAME>:<PORT>Â
format.deployment_configs: - <NODE1_HOST_NAME>:<NODE1_PORT> <NODE2_HOST_NAME>:<NODE2_PORT>
Eg:
deployment_configs: - localhost:9090 10.100.4.140:9090
List down the UUIDs of required rule templates under each node. This results in Siddhi applications created out of the business rules derived from those templates being deployed in the required nodes.
deployment_configs: - <NODE1_HOST_NAME>:<NODE1_PORT>: - ruleTemplate1_UUID - ruleTemplate2_UUID - ruleTemplate3_UUID
e.g.,
deployment_configs: - localhost:9090: - sweet-production-kpi-analysis - stock-exchange-input - stock-exchange-output
If required, you can enter a specific rule template under multiple nodes as shown below.
Before entering a specific rule template under multiple node, make sure that you have selected Many for the Instance Count field of the template. For more information, see Creating a Business Rule Template.
deployment_configs: - <NODE1_HOST_NAME>:<NODE1_PORT>: - ruleTemplate1_UUID - ruleTemplate2_UUID - ruleTemplate3_UUID <NODE2_HOST_NAME>:<NODE2_PORT>: - ruleTemplate1_UUID - ruleTemplate3_UUID <NODE3_HOST_NAME>:<NODE3_PORT>: - ruleTemplate2_UUID - ruleTemplate3_UUID - ruleTemplate4_UUID
e.g.,
deployment_configs: - localhost:9090: - sweet-production-kpi-analysis - stock-exchange-input - stock-exchange-output 10.100.40.169:9090: - identifying-continuous-production-decrease - sweet-production-kpi-analysis
Note that the rule template with theÂ
sweet-production-kpi-analysis
UUIDhas been configured under two worker nodes. As indicated by this, if a business rule is derived fromÂsweet-production-kpi-analysis
, Siddhi Applications created from it are deployed in both the nodes.Specify the username and password that are common for all the worker nodes.
username: admin password: admin
The complete deployment configuration for Business Rules looks as follows.
wso2.business.rules.manager: datasource: BUSINESS_RULES_DB deployment_configs: - localhost:9090: - stock-data-analysis - stock-exchange-input - stock-exchange-output - identifying-continuous-production-decrease - sweet-production-kpi-analysis username: admin password: admin