Skip to content

execute round trip negates a decision and swaps its outcomes #1742

Open

Description

@mkrouwel

mxcli: v0.29.0 (2026-10-30) · Mendix: 11.12.4 (also seen on 10.24.11)

Summary

When a decision's true branch has no activities and its false branch does,
DESCRIBE MICROFLOW renders it as if not(<condition>) then <false branch> end if;.
Executing that description stores the decision literally as not(<condition>) with the
true/false outcomes swapped. Behaviour is unchanged, but the model is changed: a different
expression and swapped outcome labels in Studio Pro. So describe → execute is not a
round trip for this shape.

Steps to reproduce

  1. Create the flow (true branch empty, false branch sets $Valid = false):

mdl 1;
create microflow SourceExamplesModule.Repro_DecisionNegation ($Value: String)
returns Boolean
begin
declare $Valid Boolean = true;
@caption 'Value filled?'
if $Value != empty then
else
set $Valid = false;
end if;
return $Valid;
end;

  1. DESCRIBE MICROFLOW SourceExamplesModule.Repro_DecisionNegation gives (layout lines omitted):

if not($Value != empty) then
set $Valid = false;
end if;

  1. Execute that description unchanged under a new name
    (SourceExamplesModule.Repro_DecisionNegation_RoundTrip).

Result (mxcli bson dump)

Flow Decision expression true → false →
Repro_DecisionNegation $Value != empty EndEvent ChangeVariable ($Valid = false)
Repro_DecisionNegation_RoundTrip not($Value != empty) ChangeVariable ($Valid = false) EndEvent

Expected

The round-tripped flow stores the decision as $Value != empty with the original
outcomes. For example, DESCRIBE could emit if <condition> then else <branch> end if;
(the form step 1 accepts), or execution could normalise not(...) with a then-only branch
back to the original orientation.

Impact

Conversion scripts generated from DESCRIBE output rewrite every such decision. In one app
this turned all five validation decisions of a single microflow into not(...) with
swapped outcomes. It also occurs in the Marketplace module FeedbackModule.VAL_Feedback
(3 decisions described as if not(...)).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions