1. Home
  2. Decision table final logic

Decision table final logic

Print Friendly, PDF & Email

◷ Reading Time: 3 minutes

Decision Table Final Logic

Once a Decision Table is designed, it will build up all the expressions for actions and conditions based on how it is modeled.

All Decision Tables will be translated (compiled to) Validation logic on execution. To check the executable validation tree logic, click on the Compile to Validation Tree highlighted on the above toolbar.

You can see the actual expressions that will be evaluated. Let’s say you have modelled the following Decision Table:

Once you press the button, you can see the XML representing the tree logic of your Decision Table will all build expressions. For example, the picture below shows you the R7 rule:

This is not the whole tree logic of the above Decision Table. It is just the logic for R7.

Validation Tree

It is also possible to retrieve the Validation Tree programatically. To do that you need to:

  1. Get ITable of your Decision Table
  2. Use TableParser parse and transform your Decision Table to its validation tree
// Load the Decision Table model from its content (i.e., binary/string)
var decisionTableModel = LoadAdapterUtility.LoadModel(Encoding.UTF8.GetBytes(decisionTable));
 
// Create a table reader to build ITable of the Decision Table model
var reader = new XmlTableReader(decisionTableModel);
IIterable<ITable> tables = reader.GetTables();
 
// Use TableParser to create the validation tree of the Decision Table
IElementModel validationModel = TableParser.CreateParser().Parse(tables).First();
 
// If you need the XML equivalent of any IElementModel, you can use ToXml method. 
string validationXml = validationModel.ToXml();

What’s next?

  1. Introduction to decision tables
  2. Preparing a decision table
  3. Modeling decision table
  4. Decision Model and Notation – decision table
  5. Check overlaps
  6. Decision Table final logic
  7. Multilingual decision table
  8. Decision Table 101

Tutorials

  1. Decision Table Hello World
Updated on July 9, 2019

Was this article helpful?