<-- Back

Boolean attribute used in decision without comparison: No connecting flow found after processing activity (gateway value: null)

Issue

When using a boolean attribute directly in a decision without an explicit comparison, the following error occurs:

Caused by: com.mendix.modules.microflowengine.MicroflowException: No connecting flow found after processing activity 'Decision name' (gateway value: null) in microflow 'Microflow name'

For example, this error occurs when the decision expression is written as:

$BooleanObject/booleanValue

Instead of:

$BooleanObject/booleanValue = true

Environment

Studio Pro (all versions)

Cause

This error occurs when a boolean attribute holds an empty value. In Mendix Studio Pro, an empty boolean is neither true nor false. This follows the semantics of NULL values in Structured Query Language (SQL), to which XML Path Language (XPath) expressions are translated. From the Mendix documentation on empty values:

If the value of an attribute in the database is empty, this is interpreted as "unknown" and any comparison of that attribute to another attribute will not match, even if both are empty.

When the decision expression is written as $BooleanObject/booleanValue, Mendix Studio Pro attempts to convert the empty value directly to a boolean. This conversion is not supported, which causes the gateway to return null and triggers the error.

When the expression is written as $BooleanObject/booleanValue = true, the empty value is compared to true, which evaluates to false. This allows the decision to follow the false path without error.

The table below summarizes the behavior:

Expression Boolean value Result
$BooleanObject/booleanValue = true empty Evaluates to false
$BooleanObject/booleanValue = false empty Evaluates to false
$BooleanObject/booleanValue
empty Error: cannot convert empty to boolean

Solution / Workaround

To resolve this error, handle empty boolean values before the decision using a validation check. This ensures the decision always receives a valid boolean value.

Follow these steps to add a validation check:

  1. In Mendix Studio Pro, open the microflow that contains the decision.
  2. Before the decision, add a new decision to check whether the boolean attribute is empty. Use the following expression: $BooleanObject/booleanValue = empty
  3. On the true path of the empty check, add a Change Variable or Change Object activity to set the boolean attribute to a defined default value, such as false.
  4. Connect the false path of the empty check directly to the original decision.
  5. Ensure the original decision uses an explicit comparison: $BooleanObject/booleanValue = true
  6. Save the microflow.

This approach ensures full control over the outcome and prevents the error from occurring.

Internal information related

  • 281740
  • RUN-5255
  • C3T260XGA/p1782477402918279
  • [Internal] Empty values in XPath comparison expression

Additional information

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.