Decision Table
A decision table row represents a business rule. It has one or more conditions and one or more actions.
Each condition cell is equivalent to one condition (one line) in the TIBCO BusinessEvents rule editor condition area. Similarly each action cell is equivalent to one action (one line) in the TIBCO BusinessEvents rule editor action area (that is, one rule). Decision table rules are like business rules. The rule that calls the virtual rule function that implements the decision table participates in inferencing in the usual way. When the virtual rule function is called, the decision table rules are applied.
Conditions and Actions
The columns of a decision table are made up of condition columns on the left, and action columns on the right. Each column represents one condition or one action.
A condition is a test that must evaluate to true before the action is executed. If a decision table rule uses multiple conditions, all the conditions for a row must evaluate to true for the action to execute.
In each row (rule) you define the specific conditions and actions. For example, if a condition column is Age (using a concept property of that name), then each row can define a different age range. The action for each row would define what action to take if a given concept instance contains an age property within the specified range.
If you add a second condition column called Income, then before the action is taken, a concept instance would be tested to see if both the age and the income are within the ranges specified in the rule’s conditions.
Regular and Custom Conditions and Actions
- Regular condition
- It is the value of an entity specified in the virtual rule function scope, or a simple comparison with the value - is greater than, is less than, is greater than or equal to, is less than or equal to.
- Custom condition
- It can use the rule language, standard functions, and data in the scope of the function at runtime (for example, scorecards and global variables). It can contain complex formulas.
- Regular action
- It sets the value of an entity specified in the VRF scope.
- Custom action
- The action can use the rule language, standard functions, and data in the scope of the function at runtime to do whatever is desired. For example, the action could be to send an event out to a different system for follow-up.
- Using non-literal values in a regular condition or regular action
- Suppose event A and event B are in scope, and event A has property ZZ, and event B has property YY. Both properties belong to the same data type. Suppose you then drag property ZZ to a condition or action column. In the cell, you can then specify a value as b.YY. The effect is different depending on the type of column:
- Creating a Decision Table
A decision table can only be created using a virtual rule function (VRF). - Deleting a Decision Table
You can remove a newly added table as well as any existing table from the project. - Renaming a Decision Table
You can rename a decision table in WebStudio to a more suited name, which identifies its functionality more appropriately. - Setting the Decision Table Properties
In the Group Contents section, double-click the decision table you want to open. You can now edit, analyze, and export the open decision table. - Enabling or Disabling the Page View
When a large table is displayed in multiple pages, it improves the server response time as well as a better user experience. - Analyzing a Decision Table
In the Table Analyzer you can set example condition values and perform various validation checks on the currently displayed decision table. - Validating a Decision Table
In TIBCO BusinessEvents WebStudio, validate a decision table, for any access control violations or syntax errors in the table, using the validate command. - Validating a Decision Table Using Test Data
Using test data you can verify if the decision table covers all the data that might be passed through the decision table. This enables you to add more rules to the decision table, if the decision table is not able to cover the test data. - Exporting a Decision Table
You can export decision tables from TIBCO BusinessEvents WebStudio to Microsoft Excel spreadsheets. - Importing a Decision Table
You can import correctly formatted Microsoft Excel file to create a decision table or to merge to an existing decision table in TIBCO BusinessEvents WebStudio. - Adding Condition and Action Columns from Arguments
Add the condition and action columns using the arguments under the virtual rule function scope. - Adding Custom Condition and Action Columns
Add the condition and action columns using the rule language, standard functions, and data in the scope of the function at runtime (for example, scorecards and global variables). - Defining Custom Columns Using Substitution
You can specify complex entries in a column by using column substitution. This feature works where all the entries in a column follow a specific pattern. - Setting Default Value in Decision Table Column
Using the Field Settings option of the column, you can set a default expression for the column for all new rules. - Viewing or Hiding Columns in the Decision Table
To avoid scrolling tables with large number of columns, you can view only the columns that you want in the decision table and hide all others. - Resizing a Column
To view the conditions and actions value better, you can resize the column of a decision table. - Removing a Column
Remove a column when you need to remove the condition or action for the entire decision table. - Sorting the Decision Table
The rows of a decision table can be viewed in a ascending or descending order of the selected column. - Setting Row Priorities
Each row in a decision table represents a separate business rule. You can control the order in which sets of rows are executed using the row priority setting. - Filtering the Rows
Apply filters to focus on certain rows instead of entire table. - Creating Duplicate Rows
You might want to create Duplicate rows, when you have only minor condition or action of the existing rows to create a new rule, instead of creating the entire row from start. - Removing a Row
Remove the row if you want to delete the rule entirely instead of editing it. You can remove only one row at time. - Supported Operators
TIBCO BusinessEvents WebStudio supports several operators for Decision Tables that you can use in the expressions.