
You use this procedure to make changes in a decision table according to your needs.
Adding a Row in a Decision Table
Set condition values to all the condition headers in the Decision Table in the Decision Table query.
query.setConditionValue("ConditionHeaderName_1","ConditionValue_1");
query.setConditionValue("ConditionHeaderName_2","ConditionValue_2");
query.setConditionValue("ConditionHeaderName_3","ConditionValue_3");
IDecisionTableRow dtRow = dt.addRow(query);
Editing a Cell in a Decision Table
Search the row that contains the cell which you want to edit.
query.setConditionValue("ConditionHeaderName","ConditionValue");IDecisionTableRow[] dtRow = dt.getRows(query);
Retrieve the cell.
ICell cell = dtRow[0].getCells()[2];
Enter the new value in the cell.
cell.setValue("New cell value");
Splitting a Cell in a Decision Table
Search the row that contains the cell which you want to split.
query.setConditionValue("ConditionHeaderName","ConditionValue");IDecisionTableRow[] dtRow = dt.getRows(query);
Retrieve the cell.
ICell cell = dtRow[0].getCells()[2];
Enter the number of divisions you want to create.
IDecisionTableRow[] dtRow = cell.split("Value for the split cell");
Deleting
Deleting a Cell
Search the condition value, held in the row which contains the cell you want to delete.
query.setConditionValue("ConditionHeaderName","ConditionValue");IDecisionTableRow[] dtRow = dt.getRows(query);
Retrieve the cell.
ICell cell = dtRow[0].getCells()[2];
Delete the cell.
cell.delete();
Deleting a Row
Search the condition value held in the row which you want to delete.
query.setConditionValue("ConditionHeaderName","ConditionValue");IDecisionTableRow[] dtRow = dt.getRows(query);
Delete the row.
dtRow[0].delete();
Deleting a Decision Table
Set the condition and action value in the Decision Table query
Perform as of the sub steps as required.
If you want to delete the Decision Table based on a condition value, then enter the Condition Header Name and Condition Value.
query.setConditionValue("ConditionHeaderName","ConditionValue");
If you want to delete the Decision Table based on an action value, then enter the Action Header Name and Action Value.
query.setActionValue("ActionHeaderName","ActionValue");
If you want to delete the Decision Table based on both condition and action values, then enter the both the Condition and the Action Header Names and values.
query.setConditionValue("ConditionHeaderName_1","ConditionValue_1");
query.setConditionValue("ConditionHeaderName_2","ConditionValue_2");
query.setActionValue("ActionHeaderName_1","ActionValue_1");
query.setActionValue("ActionHeaderName_2","ActionValue_2");
Delete the decision table.
dt.deleteRows (query);