Decision

Last update: Edit

1 Introduction

This document describes a Decision in Mendix Studio.

A decision is an element based on a condition; it follows one and only one of the outgoing flows. For example, you need to use a decision to show different order forms for the customers with different grades, or to prevent a blocked customer from making orders.

2 Condition

There are two ways to configure a condition for the decision:

2.1 Configuring the Condition with Variables or Attributes

The following elements can be used as a decision condition in the Variable/Attributes tab:

  • Variable with Boolean data type
  • Variable with enumeration data type
  • Attribute of Boolean type
  • Attribute of enumeration type

2.2 Configuring the Condition with an Expression

You can also configure the condition by writing the expression. For more information on how to write an expression, see Microflow Expressions.

3 Cases

Cases define the number of outgoing flows and depend on the selected Condition.

For the Boolean type of the parameter or attribute, two flows are possible: true and false.

The number of cases available for the enumeration type depends on the corresponding enumeration values. There is also the empty case available for enumeration: if the enumeration parameter or an attribute of an object is unassigned, the sequence flow with the caption (empty) is followed.

For example, if a end-user needs to select a customer grade but does not do that, the flow labelled (empty) is followed and an error message is shown to the end-user:

4 Caption

The caption describes what happens in this element.

5 Read More