Show TOC

Decision Tree ExpressionLocate this document in the navigation structure

Use

A decision tree expression allows the definition of a binary tree of expressions. The non-leaf nodes are called condition nodes. These nodes return a result of type Boolean. Depending on the result, the left or the right node is processed. Once a leaf node is reached, the assigned expression is processed and the corresponding result is returned as the result of the whole expression.

Structure

The decision tree structure is a concatenated list of yes/no decisions. Each condition node is broken up into two branches representing the true or the false alternative for that condition. Each branch can either lead to another condition for further refinement or to a leaf node with an assigned result. The following picture illustrates the basic principle:

Figure 1: Decision Tree Schema
Features

Result Types

You can decide whether a decision tree expression shall return a value or perform an action:

  • Returning a value: In this mode, you have to take care that all leaf nodes have a value or expression assigned with the same type as the result data object of the decision tree expression.

    Note

    When defining a decision tree in the BRFplus workbench, first assign a result data object to the tree expression before you start to define the results for the different leaf nodes. Only under this condition the system gives you access to suitable expressions or lets you enter result values directly. With no result data object defined, you can only assign element data objects to a node as a result.

  • Performing an action: In this mode, the decision tree expression triggers the action assigned to the leaf node that matches the input. The result data object is automatically set to the predefined Actions table that returns the list of IDs of the actions (result action plus follow-up actions that may be associated with that action) that are executed.

Once the result type settings have been made and the decision tree has been saved, the system hides these settings in the Detail section of the UI by default. However, you can still modify these settings by clicking on Show Result Data Object .

Note

The reason for the system to hide the result type settings is that changing these settings leads in most cases to the need for a complete reassignment of objects to the leaf nodes of the decision tree. Hence, hiding these settings is meant as a protection against inadvertent changes.