Skip to content

DESCRIBE MICROFLOW hangs on a long if/elsif decision chain #1991

Backlog

Description

@mkrouwel

mxcli v0.34.0 · Mendix 11.12.4

What happens

DESCRIBE MICROFLOW on one microflow never returns: it hits the 5-minute statement timeout (statement timed out after 5m0s). Removing .mxcli/catalog.db and .mxcli/cache/unit-contents.db does not change it, and neither does closing Studio Pro. On the same project, at the same moment:

  • DESCRIBE MICROFLOW on any other microflow returns in < 0.5 s;
  • SHOW MODULES works;
  • mxcli check and mxcli exec of an ALTER MICROFLOW … { drop … } on this same microflow finish in ~2 s and apply correctly.

So reading the flow works. Only rendering it as MDL hangs.

The microflow

A function microflow built in Studio Pro that takes a string parameter and returns an enumeration value:

  • 1 start event, 1 rule split (a Marketplace rule with one string parameter), then a chain of 57 expression splits (if … elsif … elsif …), each true branch going straight to an end event that returns an enumeration value;
  • 58 ExclusiveSplit, 59 EndEvent, 118 SequenceFlow, all with BezierCurves, no merges, no loops;
  • every split expression is a single startsWith($var, '<literal>') or contains($var, '<literal>') on a local string variable, with short string literals (some containing ;, = or --);
  • the canvas is tall: y from -3309 to 2621, x from -207 to 574.

What does not reproduce it

A microflow with the same topology, created by mxcli exec, is described in 0.4 s. It has the same 58-branch if/elsif chain, the rule split first, enumeration returns, and expressions of the same form, with the same literals. The difference seems to be the layout Studio Pro stored (positions/curves), not the logic.

Expected

DESCRIBE MICROFLOW returns, or fails with an error naming what it cannot render.

Notes

I can share the .mxunit of the microflow privately if that helps.

Activity

  1. mkrouwel commented on Dec 3, 2026

    @mkrouwel
    Author

    mxcli v0.34.0, Mendix 11.12.4

    This looks like the same root cause as #1989 (fixed in #2005): the hang depends on .claude/layout-config.yaml with flows: preset: true-right-false-down, not on the layout Studio Pro stored. Without that file, the flow from this issue describes in well under a second.

    It also hangs REFRESH CATALOG FULL SOURCE, because the source phase describes every document:

    • With the preset, a cold build (no .mxcli/) of a project of about 2,260 documents stays on … building catalog, source N-1/N documents with full CPU. It had not finished after 40 minutes.
    • The same copy without layout-config.yaml builds in about 25 s. With only lint-config.yaml it builds in about 35 s.
    • lint, report and every other catalog-backed command hang with it.
    • The progress line does not name the document, so the flow behind it cannot be found from the output. I found it only by describing every microflow one at a time with a time limit.

    Splitting the long decision chain into smaller flows is not enough. After the split, the largest remaining part still does not describe within 60 s with the preset. Three other flows in the same project take 15–30 s with it, and one of them takes 12 s without it.

    Can #1991 be closed as a duplicate of #1989 once #2005 is released? Please also check the catalog source phase against the fix. Ideally, a document that takes too long is named and skipped, so the build does not stall.

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