Expertsystemen

 

Getting started with conditions

Conditions are important to understand in xxllnc Expertsystemen. They can be used for all kinds of things, such as guiding a user through a specific path or creating conditional sections in a document.

The basic idea is simple: when there is a condition set on an action, xxllnc Expertsystemen performs that action only if that condition is met. For example, if you answer ‘yes’ to a question about more information, you will be asked to enter your e-mail. If you answer ‘no’, the model is finished.

We will illustrate this with an example. In the example, a model asks about the data of a partner if you have one. Imagine a decision tree model with three nodes: start, end_node and partner_details. The node start connects to the two other nodes, and a question in the node start asks whether the user has a partner. The model looks like this:

the example model
the example model

The next step would be to add the condition. In the node start, you can double-click the connections to the other nodes. If you do so, a dialogue will pop up with the connection and an empty condition. In this dialogue, you can select the drop-down menu to choose a condition:

editing a condition
editing a condition

Make sure that if you select ‘Yes’ in the question, the user will go to the partner details and if you answer ‘No’ the user will go to the end node. Your action menu should look like this:

resulting action menu
resulting action menu

NOTE: Expertsystemen executes rules in order, working from the top to the bottom. So in the above example, the condition to go to node partner_details is checked first. If that condition is met, the current node is left and any subsequent rules are ignored. When that condition is not met, the rule to go to end_node gets executed. Its condition will in this case always be met, so we might have also left it out. Having it explicit however may make the rules easier to grasp, plus it makes the system more robust: reversing these explicitly conditioned rules will still yield the same outcome.

To read more in-depth material about conditions, please see Model flow: Conditions.