Creating a Decision Table in Business Rules

A decision table organizes if/then rules into a spreadsheet-like format, in which rows represent conditions and actions, and columns match condition values to action alternatives.

To create a new decision table:
  1. In the Business Rules Editor, click Rules.
  2. Click Decision Table in the canvas or select Decision Table from the Add drop-down list in the left pane.
    An empty decision table appears. The default name is Decision Table 1.
  3. Optional: To change the decision table name, click Properties next to the name, edit the name, and click OK.
  4. For each condition you want to add:
    1. In the decision table toolbar, select Add Condition from the Add drop-down list.
      The Add/Modify Condition dialog box opens.
    2. Type a condition value in the Condition field or expand the folders in the Name column to browse for functions and decision data objects.
      To find the input data objects you already specified (see Creating a Decision), expand
    3. Click Select or Edit Value Set.
      If the data object for this condition is boolean (true or false), you can skip this step and the next.
      The value set page of the Add/Modify Condition dialog box opens.
    4. Select an existing value set from the list on the left, or select Local Value Set or Local Range Value Set to create a new value set that applies only to this condition.
    5. Click Done.
      The Add/Modify Condition dialog box closes.
    6. If this is the first condition, select Add Rule from the Add drop-down list repeatedly, until you see an Rn column for each value or value combination you need.
      For subsequent conditions, you might need to add additional columns to account for more condition combinations.
    7. Click each table cell and select one or more values from the drop-down list that appears.
      If the value in a cell doesn’t matter, select All from the list. A dash appears in the cell.
  5. To add conditions that apply to all rules or to create variables to make rules more readable, expand Tests and Variables.
    For example, if all rules in your decision table apply only to legal adults, you can add a condition such as Duration.years between(Person.birthdate, same or more than 18.
  6. In the decision table toolbar, select one of the Add Action commands from the Add drop-down list:
    • create — Creates a new data object and assigns a value to it. Use this action for an output data object, unless it's also an input data object.
    • call function — Calls a function.
    • modify — Modifies the value of an existing data object.
    For descriptions of other actions, see Using Advanced Actions.
    An output data object can only be created once. Therefore, if multiple rules and decision tables affect the same output data object, use create in an initial action, then use modify in the rules and decision tables. Want to learn more about initial actions? See Editing Decision Properties.
    The Action Editor dialog box opens.
  7. Select a function or decision from the data objects list.
    You can find the output data objects you specified in Creating a Decision by selecting decision-name.out.
  8. To use different action values for different conditions, select the Parameterized check box for each function or decision argument.
  9. Click OK.
  10. For each action cell:
    1. Click the cell and click Select Value.
      The Condition Browser appears.
    2. Expand the desired value set and select a value.
    3. Click OK.
    You can't create a local value set for an action. You must use an existing value set.
  11. Add more actions if necessary.
    All actions are applied, in order.
  12. If conflicts occur, see Adding Conflict Resolutions to Decision Tables.
  13. Use these commands on the Tools menu to clean up or rearrange the decision table:
    • Identify Possible Missing Rules: Checks for condition combinations you might have missed.

    • Order Rules by Value: Orders condition combinations by value from left to right and merges cells with the same value where possible.

    • Generate Unique Rules: Displays all condition value combinations by eliminating merged and all-value (dash) cells.

    • Switch Rows to Columns: Pivots the table so that rules are rows and conditions and actions are columns.

  14. When you’re done creating the decision table, click Save and Publish.
    Here’s an example of a decision table with two conditions:
    Description of decision-table-example.png follows
    Description of the illustration decision-table-example.png