Dynamic Decision Table Editor

The Dynamic Decision Table Editor provides much the same functionality as the static decision table editor in the Aion BRE development environment.

This diagram represents Dynamic Decision Table Editor.

Decision tables are displayed in the Dynamic Rule Manager with the icon shown. This icon serves to identify decision tables in the Domain Workspace as well as representing the New Decision Table icon on the toolbar.

Creating a New Dynamic Decision Table

To create a new decision table

  1. Choose Rule, New, Decision Table... to display the New Rule dialog.
  2. Enter the decision table name and click OK to display the Dynamic Decision Table Editor in the Output Window.
  3. The editor opens to a blank Table page. The typical procedure would be to click the Conditions/Actions tab to begin defining the conditions and actions that make up the dynamic rule.

For more information about creating decision tables, see Create Decision Table.

Opening an Existing Dynamic Decision Table

To view or edit a dynamic rule:

  1. Double-click the desired dynamic rule icon in the Rules tree in the Domain Workspace.

    Or, highlight the name of the rule in the Domain Workspace and choose Rule, Open from the Dynamic Rule Manager menu.

  2. Click the Properties, Table, or Conditions/Actions tab as appropriate.

Viewing and Modifying Dynamic Decision Table Properties

To view or modify properties of the decision table, click on the Properties tab of the decision table editor.

The Property page of the Dynamic Decision Table Editor appears as:

This diagram describes the property page of the Dynamic Decision Table Editor.

Adding and Modifying Conditions

Conditions define the premises of a Decision Table rule. A Condition is composed of a Condition Name and a number of Test cells. Test cells display ranges or values specified in the Condition row.

In the Dynamic Decision Table Editor, one can use only domain interface members, which are referenced through their labels. To add a Condition, select Domain Condition for the Condition pop-up menu.

This diagram describes the option to select Domain Condition for the Condition pop-up menu to add a Condition.

Domain Condition allows you select a domain interface member from the Name drop-down list.

To define a dynamic decision table condition

  1. In the Dynamic Rule Manager, choose Rule, New, Decision Table... to open the Decision Table Editor.
  2. Click the Conditions/Actions tab.
  3. Right-click in the Condition area to display the Condition menu, and select New, Domain Condition.
  4. Select a name for the new Condition from the domain interface Members drop-down list. (This list contains all domain interface members that are Conditions.)
  5. Define the values for the selected domain interface Member.
  6. You can arrange the order of Conditions by highlighting a Condition and clicking the up/down arrows.
  7. Repeat Steps 3-5 as necessary.
  8. Check Test Unknown Value/Test Other Values, as appropriate.

Test values for a condition are specified according to the following rules:

Adding and Modifying Actions

Actions define the activities to be taken by the Decision Table rule if the conditions are met. Actions are composed of an Action and a number of Selector cells.

In the Dynamic Decision Table Editor, one can use only domain interface members, which are referenced through their labels. There are two types of Actions that can be selected from the Action pop-up menu.

This diagram describes the option to select one ffrom the two types of Actions.

What do these types of Actions represent?

To define a dynamic decision table action

  1. In the Dynamic Rule Manager, choose Rule, New, Decision Table... to display the Decision Table Editor.
  2. Click the Conditions/Actions tab.
  3. Right-click in the Action area to display the Action menu.
  4. Select New, Domain Action or New, Multiple Domain Action, depending on the number of methods you require.

    Domain Action-May be a domain interface Member that takes at most one input argument.

    Multiple Domain Action-May take a list of different domain interface Members, none of which can have an input argument.

  5. Enter a name for the new Action.

    For a Domain Action, use the name of the domain interface Member to be executed when that Action is indicated in the decision table. For a Multiple Domain Action, enter a name of your choice.

  6. Repeat steps 3-5 as necessary.
  7. Optionally, arrange the order of Actions by clicking the up/down arrows.
  8. Click the Table tab. If Auto Refresh is checked, the decision table will be built. Otherwise, right-click anywhere on the table and select Refresh or Auto RefreshSpecify the appropriate actions for each combination of Condition values:
  9. Choose File, Save to save the decision table.

    Note: It is possible to save incomplete and invalid rules. For example, this can occur when the:

    This feature allows you to save your work and return to it later. When the table is invalid, the Active checkmark on the Properties page will be disabled if it is checked on.

Summary: Specifying Selector Cells

If no selector cells for Actions are specified for a given combination of condition cells, the corresponding action cells are highlighted in the Decision Table Editor. (By default, highlighting is red.) This highlighting is a warning that there is a potential "hole" (that is, a possible outcome for which no action is specified) in the table logic. This could be valid if the combination of values is impossible, that is:

Has Driver License = TRUE 
and Age < 16 

A blank selector cell indicates that the decision table will invoke no activity for an Action for the combination of Conditions. To invoke a result for the decision table, the selector cell must be specified. Selector cells are specified in three ways depending upon the nature of the action.

Decision Table Editor Functions

The functions described below are the same in the static and dynamic rule editors. For more information, see Decision Tables.

Deleting a Rule

To delete a rule from the rulebase:

  1. Select the rule in the Domain Workspace of the Decision Table Editor.
  2. Choose Edit, Delete, or right-click to display a pop-up menu and choose Delete.

Ordering Conditions and Actions

When the Conditions/Actions page is displayed, you can use the Move Up and Move Down arrows to change the order of Conditions or Actions in the generated decision table.

This diagram describes the Conditions/Actions page, where the Move Up and Move Down arrows are used to change the order of Conditions or Actions in the generated decision table.

For step-by-step procedures for changing the order of Conditions or Actions, see Decision Tables.

Note: Aion also provides an automatic means to order conditions to achieve the minimal number of combinations of conditions. For more information, see Achieving Optimal Condition Order for Compressibility.

Cutting and Pasting Conditions and Actions

For step-by-step procedures for cutting and pasting conditions and actions, and for cutting and pasting sub-table contents, see Decision Tables.

Displaying a Dynamic Decision Table

You can control the appearance and/or behavior of a decision table on the Table page by right clicking in a non-table area of the page. A pop-up menu appears with the following options:

Menu Option

Explanation

Related Topic

Show compressed

See Compressing a Dynamic Decision Table

 

Optimum condition order

See Achieving Optimal Condition Order for Compressibility

 

Toggle layout

Changes display between landscape and portrait.

Layout can be set on the Properties page, see Viewing and Modifying Dynamic Decision Table Properties

Refresh

Redraws the decision table according to the latest changes to the definitions of the conditions and/or actions.

 

Auto refresh

Toggles automatically refreshing of the decision table. Automatic refreshing cause the table to redrawn when it is redisplayed following any changes to the definitions of the conditions and/or actions.

 

Customizing the Decision Table Editor

You can use the Decision Table Options dialog to set options that control how the editor displays decision tables. Select the Decision Table Options command from the File menu. For more information about setting these options, see Customizing the Decision Table Editor.

Note: The Domain Interface Filter group is not available in the Dynamic Rule Manager.

You can also select the font in which the Decision Table displays information. Select the Fonts command from the File menu.

Note: For more information about setting fonts, see the Fonts section of the "Creating and Editing Applications" chapter of the User Guide.

Compressing a Decision Table

Compression is an edit-time feature concerned with making optimal use of screen real estate when displaying a decision table. Values are suppressed when those values are not relevant for distinguishing between different actions.

Compressing a decision table is done by right clicking on the background of the Table page and selecting "Show compressed" from the pop-up menu. For examples of compression, see Compressing a Decision Table.

Note: Actions of compressed subtables are not editable.

Manually Collapsing Subtables

Aion allows you to manually specify particular parts of the decision table that you may wish to collapse temporarily so that you can focus on a particular area of a table. For step-by-step procedures for compressing and collapsing the decision table, see Compressing a Decision Table.

Note: Actions under manually collapsed subtables are not editable.

Achieving Optimal Condition Order for Compressibility

Aion also provides a sophisticated algorithm for determining the optimum order of the Conditions in your decision table to achieve optimum compressibility. For step-by-step procedures for compressing and collapsing the decision table, see Compressing a Decision Table.

For more information about determining the order of conditions to achieve greatest compressibility, see Achieving Optimal Condition Order for Compressibility.

Accessing the Dynamic Rule Repository

The Dynamic Rule Manager also provides access to the Dynamic Rule Repository. The Dynamic Rule Repository supports a business rule process for maintaining business rules. (For more information about business rule maintenance scenarios supported by the Dynamic Rule Repository, see "Business Rule Maintenance Scenarios in the Dynamic Rule Management" chapter of the User Guide). The Dynamic Rule Repository is not Aion-related software and may not be available in all environments. Dynamic rule repository functionality is provided by means of a Source Code Control (SCC) compatible source code control program (such programs include Microsoft Visual SourceSafe and CA Harvest Change Manager). Dynamic rules can be saved as source code within the database of the source code control program. The Dynamic Rule Manager uses the standard SCC application programmer's interface (API) to provide a subset of the functionality of the source code control program for dynamic rules.

Advantages of using the Dynamic Rule Repository include controlling access to rules through the check-out/check-in protections offered by a source code control program. These protections prevent two business experts from changing the same rule at the same time.

To access the Dynamic Rule Repository, right click the name of a rule in the Domain Workspace. This action invokes a pop-up menu that opens up the source code control program API functions provided within the Dynamic Rule Manager.


Copyright © 2009 CA. All rights reserved. Send E-mail to CA about this topic