Decision Tree Expression
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.
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:

Decision Tree Schema
You can decide whether a decision tree expression shall return a value or perform an action:
Return 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.
Perform 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 displays these settings in the Detail
section of the UI by default.
Note
Changing the result type settings leads in most cases to the need for a complete reassignment of objects to the leaf nodes of the decision tree. We therefore recommend to take extra care before you decide to change the result type settings of an already defined decision tree.