Skip to content

RESET LAYOUT microflow option is missing from mxcli entirely #837

Description

@MendixMau

Solution exists in fork: already implemented in engalar/mxcli (commit 2fabbac31). See below for the reference implementation and its own regression test.

Environment: mxcli (RnD/upstream, commit 504aec6), Mendix 11.12.0 project (EmptyTest base).

Steps to reproduce:

create module ZKT28;
/
create microflow ZKT28."MF_Test" () reset layout
begin
	declare "X" as Boolean;
end

Run mxcli check script.mdl.

Expected behavior: Either the RESET LAYOUT clause is supported (per the community fork's
implementation, it's a useful escape hatch when a script author wants Studio Pro to
re-derive activity positions from scratch instead of accepting mxcli's computed layout), or, if
it's intentionally out of scope, mxcli syntax microflow / the grammar docs should say so
explicitly rather than the original bug report implying it exists but silently misbehaves.

Actual behavior: reset/layout are not recognized tokens at all — mxcli check fails
with mismatched input 'reset' expecting {RETURNS, BEGIN, FOLDER, COMMENT}. There is no
check/exec disagreement to fix here; this is a missing-feature report, not a bug report, once
verified against the actual grammar source.

Already implemented in engalar/mxcli (see mdl/grammar/domains/MDLMicroflow.g4:112, commit
2fabbac31 for the original feature). Their own regression test
(TestResetLayoutProducesValidCoordinates in mdl/executor/flowbuilder_graph_v2_test.go)
documents and guards against a coordinate-corruption bug they hit and fixed along the way —
worth reading before porting, so the same mistake (clearing RelativeMiddlePoint to ""
instead of recomputing it) isn't repeated upstream.

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