Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

Rules and Inputs and Outputs

Decision Table rules are defined by specifying input entries and corresponding output entries within the cells of a table row.  For 'number' data types, input entries can be specified as a single value, or as a number range, such as '<10', '>100' or '(2..8]'. (When defining number ranges, the use of round brackets indicates that the bounding number is NOT included, use of square brackets indicates the bounding number is included.) Output entries should specify a single value per cell.

Additional rules can be appended to the list of rules by clicking on the icon in the toolbar.  Unwanted rules can be deleted from the table by right-clicking on the rule and selecting the option 'Delete Rule Row' from the pop-up menu.

Existing rules can be copied and pasted within the table by first selecting the rules, (use 'Ctrl+Click' to add/remove from selection), then using the menu options 'Copy Rules to Clipboard' and 'Paste Rules from Clipboard' to perform the copy and paste.  The copied rules can then be modified by selecting and editing individual cell entries.

If the 'Allowed Values' field is set for a string or Boolean expression, the Spacebar can be used for selecting a value from the list of allowed values.

Rules can also be sorted within the table, either by:

  • Clicking the icon on the toolbar, then choosing to either 'Sort By Input' or 'Sort By Output', or
  • Right-clicking on individual rules within the table and selecting the 'Move Rule Up' or 'Move Rule Down' option from the pop-up menu

To determine which table rows are selected for output, the expressions that are defined by the Input Clauses are evaluated for the given inputs and the results of the expressions are then compared against the input entries of the table rows.  Where the expression results match the input entries of a table row, that row is selected for output. 

The Decision Table's 'Hit Policy' determines how the table's matching rows are then used to produce its output; we will look at what each policy means in the next section.