Decision Table Overview

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.

Note: Conditions that are blank, contain an asterisk, or are disabled are ignored, and are treated as if they evaluate to true.

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 local computer for follow-up.
Tip:
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:
  • In a condition column, this means: compare the value of property ZZ with the value of property YY.
  • In an action column this means: set the property ZZ to the value of YY.

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.

Rows with higher priorities are executed before those with lower priorities, as follows:

  • First, all conditions are checked for all rows that have the highest priority. The checking order within a set of rows with the same priority is not determinate.
  • Then the rule actions for all of those rows whose conditions evaluate to true are executed. The execution order is not determinate. The runtime engine optimizes rule execution.)
  • The process is repeated for all rows with the next highest priority, and so on.

Ten is the lowest priority and one is the highest. Five is the default priority.