ILOG Rules for .NET User Guides > Rule Studio > Writing Rules > Working with Decision Tables > Creating Decision Tables

Decision tables are rule artifacts and in Visual Studio .NET they are part of a rule project.

To create a decision table
  1. In the Solution Explorer, right-click a rule project, and on the shortcut menu click Add, and then click New Item.
  2. The Add New Item window appears.
  3. In the Add New Item window, select the Decision Table template, provide a name for the decision table, and click OK.
  4. ILOG Rules for .NET displays the Decision Table Editor with an empty decision table.

You can now use the Decision Table Editor to define the condition and action columns for the decision table and specify values for each row. The default decision table has three condition columns and two action columns. The action columns have a shaded background.

To define a condition column
  1. In the Decision Table Editor, double-click the header of a condition column.
  2. The Edit Condition Column dialog box appears.
  3. In the Edit Condition Column dialog box, click <select a condition>.
  4. A drop-down list appears. It lists the business terms, phrases, and building blocks that you can use to construct a condition.
  5. Find the item that you want by expanding and collapsing the items in the list.
  6. Continue choosing items from the list until you have formed an expression.
  7. The expression can contain placeholders (for example, the age of the customer is between <enter a number> and <enter a number>) or be complete (for example, the size of the order is at least 10000 units).
  8. Enter a names for the placeholders (parameters) in the expression, then click OK.
  9. When there are several placeholder in the expression the Decision Table Editor splits the column and uses the names of the placeholders for the heading of the subcolumns.
To define an action column
  1. In the Decision Table Editor, double-click the header of an action column.
  2. The Edit Action Column dialog box appears.
  3. In the Edit Action Column dialog box, click <select an action>.
  4. A drop-down list appears. It lists the business terms, phrases, and building blocks that you can use to construct an action.
  5. Find the item that you want by expanding and collapsing the items in the list.
  6. Continue choosing items from the list until you have formed an expression, then click OK.
  7. The expression can contain placeholders (for example, print <select a string>) or be complete (for example, print We look forward to seeing you again soon!). Note that you can only edit action cells that have corresponding placeholders. The Decision Table Editor automatically fills cells with no corresponding placeholder with "-" symbols.

Once you have created a condition column and an action column, you can begin to specify values for the placeholders in the condition and action definitions.

To specify a value in the decision table
  1. In the Decision Table Editor, double-click a cell.
  2. Depending on the type of the value, a cursor appears in the cell, a list of allowed values, or an editor appears.
  3. Enter the value and press ENTER.

See Also

Editing Cells