Repository navigation
Description
mxcli v0.32.0
Mendix 10.24.11 and 11.12.4
Dropping a microflow and re-creating it from its own, unchanged DESCRIBE MICROFLOW output (one script: drop microflow if exists X; + the DESCRIBE text) changes its diagram. Behaviour is unchanged, but the diagram gets overlapping elements, and mxcli lint reports new MPR008 warnings. All flows were created in Studio Pro, and nothing in the DESCRIBE output was edited.
Seen on two apps:
| App A (10.24.11) | App B (11.12.4) | |
|---|---|---|
| Flows rebuilt | 22 (in a conversion) | 392 (every flow; 3 with an activity MDL can't express left out) |
| Effect | canvas-layout warnings went from 2 to 32 | loop box size changed in 13 flows, merge size in 5, extra merge in 2, merge moved in 1 |
1. A merge DESCRIBE doesn't write gets a computed position
split type $Account
when Module.EmployeeAccount then
...
@position(459, 200)
return;
when Module.CustomerAccount then
...
@position(459, 316)
return;
when Module.Account then
end split;
@position(-117, 387)
return;
In the model, the empty Module.Account case goes through a merge at (-117, 316), 90×60, to the final return. DESCRIBE writes no @merge(...) for it. After create, the merge is at (443, 200), 40×40, on top of the first branch's return at (459, 200).
With a nested case, create even makes more merges than there were:
@merge(353, 200)
case $Object/Enum
when _1 then
@position(201, 123)
declare $Flag Boolean = false;
when _2 then
when (empty) then
@position(-4, 323)
case $Object/Enum
when _1, _2 then
when (empty) then
@position(-4, 403)
return;
end case;
end case;
join shared1;
@position(353, 200)
merge shared1;
@position(463, 200)
return;
Before: the inner case ends in its own merge at (201, 323), which flows into the outer merge at (353, 200), so 2 merges. DESCRIBE writes only the outer one. After create: 3 merges in a chain, at (353, 200), (126, 273) and (236, 323).
Expected: DESCRIBE writes @merge(x, y) for every merge, so create puts each one back where it was and makes no extra ones.
2. A merge shared by nested blocks becomes two merges at the same position
@merge(1470, 200)
split type $currentUser
when System.User then
when Module.Account then
when Module.CustomerAccount then
...
@merge(1470, 200)
if $Priority/Level = '1' then
...
end if;
when Module.EmployeeAccount then
end split;
In the model, one merge at (1470, 200) closes both the split and the if nested in one of its cases: the if branches go straight to the split's merge. DESCRIBE writes @merge(1470, 200) for both blocks, and create makes two merges at exactly the same position. Before: 3 merges in the flow; after: 4.
Expected: one merge, as before. Or, if MDL needs one merge per block, create offsets the second one so they don't overlap.
3. Loop boxes are recalculated and grow into their neighbours
DESCRIBE writes @position for a loop but not its size, so create recalculates the box:
| Loop | Before | After |
|---|---|---|
| outer loop (long body, 10.24.11) | 2755×340 | 2820×362 |
| inner loop (10.24.11) | 990×270 | 1040×285 |
| empty loop (3×, 10.24.11) | 160×240 | 200×200 |
| loop (11.12.4) | 415×200 | 450×180 |
The larger boxes overlap the activities next to them (MPR008: "The box of loop … overlaps …"). #1832 made the recalculated sizes much closer than before, but they still aren't kept.
Expected: create keeps the loop's stored size. For example, DESCRIBE could write it (@size(w, h), as for annotations), or create could take it over from the dropped unit, like the other properties that are now carried over (#1831).
Minor
Every re-created merge is 40×40, where Studio Pro made them 90×60. Harmless, but it is a change on every rebuilt flow.
Activity