Decision Tables are provided to easily manage business rules in a familiar spreadsheet format. Decision tables exist within the context of a Rules Set. Multiple decision tables may exist within a Rules Set, which may also contain Rules. In the Decision Table Editor you can create and manage decision tables.
The tables may be created directly in the editor or imported into the editor from a spreadsheet format.
A Decision table may contain the following entries:
The headers for individual Attribute, Condition and Action columns have an additional label containing the name of primitive used. The operator used in each condition is displayed next to it. Hovering over the header displays the entire path of the data.

Figure: Header
Tooltip
These columns can be reordered via drag-and-drop, but only in relation to columns of the same type.
The following rule attributes are available:
| Attribute | Type | Cell Type | Default Value | DRL Code Example | Description (available via tooltip) |
|---|---|---|---|---|---|
| salience | integer | Number | 0 | salience -100 | Salience is a form of priority where rules with higher salience values are given higher priority when
ordered in the Activation queue. Salience defaults to zero, and can be negative or positive.
Drools also supports dynamic salience: salience( -$rank ) |
| enabled | boolean | Checkbox | false | enabled true | A rule cannot activate if enabled is set to false. |
| date-effective | string | Date | NA | date-effective "20-Sep-2013" | A rule can only activate if the current date and time is after date-effective attribute. |
| date-expires | string | Date | NA | date-expires "24-Sep-2013" | A rule cannot activate if the current date and time is after the date-expires attribute. |
| no-loop | boolean | Checkbox | false | no-loop true | Setting no-loop to true will skip the creation of another Activation for the rule with the current set of facts. |
| agenda-group | string | Text Box | MAIN | agenda-group "alpha" | Agenda groups allow the Agenda to be partitioned providing more execution control. Only rules in the agenda group that has acquired the focus are allowed to fire. |
| activation group | string | Text Box | NA | activation-group "beta" | Rules that belong to the same activation-group, identified by this attribute's string value, will only fire exclusively. More precisely, the first rule in an activation-group to fire will cancel all pending activations of all rules in the group, i.e., stop them from firing. |
| duration | long | Number | no default value | duration 10000 | The duration dictates that the rule will fire after a specified duration, if it is still true. (deprecated) |
| auto-focus | boolean | Checkbox | false | auto-focus true | When a rule is activated where the auto-focus value is true and the rule's agenda group does not have focus yet, then it is given focus, allowing the rule to potentially fire. |
| lock-on-active | boolean | Checkbox | false | lock-on-active true | Whenever a ruleflow-group becomes active or an agenda-group receives the focus, any rule within
that group that has lock-on-active set to true will not be activated any more; irrespective of the origin
of the update, the activation of a matching rule is discarded. |
| ruleflow-group | string | Text Bob | NA | ruleflow-group "omega" | Rules that are assembled by the same ruleflow-group identifier fire only when their group is active. |
| dialect | string | Auto-complete | As specified by the "package" | dialect "mvel" | Specifies the language to be used for any code expressions in the LHS or the RHS code block, i.e., Java or MVEL. |
The lock-on-active attribute column exists per default with the value true for the whole table. This allows each rule to only fire once by default.
Note
Take attention when disabling the
lock-on-active attribute. This can easily lead to infinite loops!
The following warning is displayed above the decision table in case of any change of the lock-on-active column:

Figure: Warning message
Disabling the attribute is only necessary in a scenario where one rule should fire as result of another rule, as in the following example:
A rule sets Person.age to 18. A second rule should react to Person.age >= 18 and set driversLicense = true. In that case the second rule needs to fire as result of the first rule.
Figure: Exception example for using disabled lock-on-active attribute
To add a decision table, right-click a Rules Set node in the Outline and select Create Decision Table.

Figure: Adding a
Decision Table
A new decision table node is added to the Rules Set and the Decision Table Property view opens.
Figure: New Decision Table
The view displays the following entries:
If a new Decision Table is added, the properties view of the Decision table opens automatically. To edit an existing Decision Table, click the according Decision Table node in the My Rule Sets tree.
To add a column, click the Add column
icon in the Decision Table toolbar.

Figure: Adding a column from the toolbar
The Add Column dialog opens. You can add attributes, conditions and actions.
A search facility is provided to find attributes, Structured Types and Primitives in the tree. All search hits are highlighted, and the tree is auto-expanded to reveal search hit nodes that may be hidden.

Figure: Searching
in the tree
To add rule attributes to a Decision table, expand the Attributes node in the Add Column dialog and select one of the provided attributes, which are described in section Available Rule Attributes.
A tooltip is displaying the description for a specific attribute, e.g.:

Figure: Tooltip
showing description for attribute
For details on rule attributes in general, you can refer to the JBoss Rule Language documentation.
A separate attribute column is created for each attribute selected from the list. Note that only one attribute can be selected for a table. An already added attribute is grayed out in the tree and not selectable again.
To add conditions to the decision table, expand the Conditions node in the Add Column dialog and select the conditions that you want to add. Optionally, you may search for the conditions you want to add in the search box, as described in section Searching for Structured Types and Primitives and select them from the highlighted search results.
All IN data defined in the containing Rule Set are displayed in a tree structure under the Conditions node. Structured
Types are represented with the
icon, may be
expanded to display their primitive leaf nodes.

Figure: Adding
Conditions
The following rules apply to selecting Conditions:
To add actions to the decision table, expand the Actions node in the Add Column dialog and select the actions that you want to add. Optionally, you may search for the actions you want to add in the search box, as described in section Searching for Structured Types and Primitives and select them from the highlighted search results.
All OUT data defined in the containing Rule Set are displayed under the Actions node in the tree.

Figure: Adding Actions
The following rules apply to selecting Actions:
When a primitive is selected, a new action column is immediately added to the decision table for that primitive.
To hide the Description and Attributes columns in a Decision table, click the Hide
Description and Attributes
icon in the table
toolbar.
To search for a text occurrence in the decision table, enter a text snippet in the Search entry field in the toolbar. All fields in the table that match are highlighted.

Figure: Searching for Text in the Table
For Condition columns, the operator can be changed by clicking the operator label. A drop list is populated with the operators specific to the column primitive data type.

Figure: Choosing
an operator
The following operators are provided according to the data type:
| Operator Icon | Description | Code Usage Example | Supported for Type | |||
|---|---|---|---|---|---|---|
| Boolean | String | Numeric | Date | |||
![]() |
Equal To | == | X | X | X | X |
![]() |
Not Equal To | != | X | X | X | |
![]() |
Greater Than | > | X | X | X | |
![]() |
Less Than | < | X | X | X | |
![]() |
Less Than or Equal To | <= | X | X | X | |
![]() |
Greater Than or Equal To | >= | X | X | X | |
![]() |
Matches | matches | X | |||
![]() |
Sounds Like | sounds like | X | |||
![]() |
Null | = null | X | X | X | |
![]() |
Not Null | != null | X | X | X | |
![]() |
In List | in ( "a", "b", "c" ) | X | X | X | |
![]() |
Not In List | not in ( "a", "b", "c" ) | X | X | X | |
![]() |
After | Date after "19-Sep-2013" | X | |||
![]() |
Before | Date before "19-Sep-2013" | X | |||
![]() |
Coincides | Date coincides "19-Sep-2013" | X | |||
Rows and columns can be managed by a context-menu that appears when right-clicking in the according table cell.
To remove a column, right-click in the column and select Remove Column.

Figure: Deleting a
Column
To move a row up or down in the table, right-click the according row and select Move Row Up or Move Row Down accordingly.

Figure: Moving
a Row inside the Table
To remove a row, right-click the according row and select Remove Row.

Figure: Deleting a Row
You can insert rows in the table directly. Right-click a row in the table and select one of the following options:

Figure: Insert a Row
To append a row at the end of the table, click the Add Row
icon in the table toolbar.

Figure: Adding a row from the toolbar
You can rename a Decision table by one of the following actions:
To delete a Decision Table from a rule set right-click the table in the My Rule Sets tree and select Delete.

Figure:
Deleting a Decision Table
A confirmation dialog opens to confirm the deletion of the table.

Figure:
Deletion Confirmation Dialog
All open views respective to the deleted Decision Table will be closed.