Chapter 9 Working With Rules and Functions : Working With Rule Sets, Rules, and Rule Functions

Working With Rule Sets, Rules, and Rule Functions
The Rule resource is only available within a Ruleset resource.
See Also
TIBCO BusinessEvents Language Reference for details about working with the rule language.
Creating Rule Sets and Rules
See Ruleset Resource Reference and Rule Resource Reference for details on the settings.
1.
Navigate to the place in your folder structure where you want to add the rule set. Right-click in the design panel, and select Add Resource > BusinessEvents Workbench > RuleSet.
2.
3.
With the rule set open, right-click in the design panel, and select Add Resource > BusinessEvents Workbench > Rule.
4.
5.
The Priority setting is used by the runtime engine when determining the order in which rules are fired. Those with a number closer to one fire first.
When there is no reason to force rules to execute in a particular order, leave the Priority set to the default and let the runtime engine determine rule order.
6.
Click Apply and save the project.
7.
Creating Rule Functions
1.
Navigate to the place in your folder structure where you want to add the rule function. Right-click in the design panel, and select Add Resource > BusinessEvents Workbench > RuleFunction.
2.
3.
4.
5.
6.
Click Apply and save the project.
7.
Working with the Rule Function Editor
Working with the rule function editor is similar to working with the rule editor, except that instead of the Declarations panel, you use an Arguments panel to specify any arguments for the function.
In the Body area, use the BusinessEvents rule language to specify the behavior of the function (unless you are defining a virtual rule function, which has only a signature and no implementation).
See Working With the Rule Editor for details.
Using Rule Functions
One way to select a rule function for use in a rule is to click the Ontology Function tab, then expand folders as needed and select a rule function from the list. (The Ontology function tab is one of the tabs that appears on the right side of the TIBCO Designer window when you are using the rule editor.)
Alternatively if you know the function signature you can directly enter the details.