How to Create a Custom Rulebase
You can create rulebases using the TIBCO Hawk Display rulebase editor. The rulebase file name can be saved without using a naming convention (as was necessary in releases prior to 5.9.0). TIBCO Hawk Agent creates the appropriate rulebase name and file when the service instance to which the rulebase is assigned is deployed.
Note: The rulebase file name should not contain the space character.
For example, if two rulebase files are created and named:
And the above rulebase files are assigned to two service instances (as described in the previous section).
When the D1-Process_Archive service is deployed, TIBCO Hawk Agent creates the following rulebase files for the service.
|
•
|
D1-Process_Archive-shared_custom1.hrb |
|
•
|
D1-Process_Archive-shared_custom2.hrb. |
Similarly, when the D1-Process_Archive-1 service is deployed, TIBCO Hawk Agent creates the following rulebase files for the service:
|
•
|
E1-Process_Archive-shared_custom1.hrb |
|
•
|
E1-Process_Archive-shared_custom2.hrb. |
The rulebase file names for each instance are stored in an external property file so the TIBCO Hawk Agent knows where to re-load the rulebase files if it is restarted.
|
•
|
Rulebase file names are stored in the <install-path> \tibco\tra\domain\ <application-name> \startup \<application-name> .properties file in the rbList property. |
|
•
|
TIBCO Hawk Agent assumes that the input rulebase file name provided when uploading a rulebase file uses the .hrb extension. If there is no file extension, Hawk Agent appends .hrb to the rulebase file during deployment. |
Variable Substitution
You can assign certain variables to a rulebase and TIBCO Hawk Agent will substitute values for the variables when the application is deployed. Variable substitution is typically used in a rulebase to change the data source from pointing to a specific service instance to point a generic service instance.
The following variables are supported by TIBCO Hawk Agent:
|
•
|
%%TIBCO_DEPLOYMENT%%— When encountered, the Hawk Agent substitutes the application’s deployment name. |
|
•
|
%%TIBCO_COMPONENT_INSTANCE%% — When encountered, Hawk Agent substitutes the service instance name. |
|
•
|
%%TIBCO_DOMAIN%%— When encountered, Hawk Agent substitutes the administration domain name. |
|
•
|
%%TIBCO_COMPONENT_TYPE%%— When encountered, Hawk Agent substitutes the component’s type. |