This section explains the procedure for editing conditions.
Prerequisite:
You have created a Decision Table.
To add a condition to the Conditions list:
Double-click the Decision Table file from Rules folder of the application. The Decision Table is located in the corresponding Rule Set folder.
To add a new condition to the Decision Table, in the Condition section of the Decision Table Editor, click Add.
A new condition with the default name, Condition0 is added to the Condition table.
Click on the default name of the condition to change it.
Enter a description (optional) for the condition in the corresponding Description column.
Enter information about substitute mapping in the Data Dictionary column. See Data Dictionary for information on how to add substitute values for user inputs.
Select a data type for the condition from the Type column. Click the down arrow in the corresponding row, to display type field options.
Click Save from the tool bar to save the condition.
The figure below demonstrates the addition of conditions called CustomerType, Region, and DayOfWeek of data type STRING.
Figure 10.5 Adding a Condition
To remove a condition, select it in the Conditions list and click Remove.
To copy the condition, select it in the Conditions list and click Copy.
To paste the condition, copy the condition as described in the above step. Select the row above which you want to paste the condition and click Paste. If you do not specify a row, the copied condition is pasted below the last condition.
You can also move the conditions up and down using the Up and Down buttons. To do this, select the condition that you want to move and click Up or Down according to your requirement.
Note
You can copy, move up, move down, and remove multiple conditions by holding down the Shift or Ctrl keys and selecting multiple rows.
You can now add results to your Decision Table. See 10.3.2 Adding or Editing Results section for more information.
Data Dictionary
Decision Tables also support the use of a custom dictionary for value mapping. You can define synonyms of values.
To use value mapping:
In the Conditions section of the Decision Table Editor, for a given condition, click the corresponding Data Dictionary cell.
The Data Dictionary dialog is displayed. The condition information is displayed in the Condition Details section of the dialog.
Enter the UDA value in the Input Value field.
Enter the value that you want to substitute for your UDA Value in the Substitute Value field.
Click Add Mapping.
The mapping appears in the Value Mapping list.
The substitute value that you entered is used in your condition in place of the Input Value that you enter.
If you entered CA as your input value and California as your substitute value, then clicked Add Mapping (see figure below), California will be the value of the condition when CA is the value of the UDA.
Figure 10.6 Substitute Mapping CA to California