You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Symptom: enumeration decision splits could not be represented as first-class MDL, so describe/exec round-trips either collapsed them into boolean-looking splits or lost the enumeration case structure.
Root cause: the microflow AST, parser, visitor, builder, describer, validator, and reference collectors only modeled boolean IF-style exclusive splits. Sequence flows with EnumerationCase values had no statement form.
Fix: add a split enum statement with case/else bodies, emit and parse enumeration case values, build ExpressionSplitCondition graphs with EnumerationCase flows, describe existing enum split graphs back to MDL, and teach validation/layout/terminality/reference walks to recurse through enum branches.
Tests: added parser, builder, describer, terminality, and validation regression tests plus a doctype fixture checked with mxcli check. Also ran make build, make lint-go, and make test.
Add round-trip MDL support for enumeration decisions:
8
+
9
+
```mdl
10
+
split enum $Status
11
+
case Open, Pending
12
+
return true;
13
+
case (empty)
14
+
return false;
15
+
else
16
+
return false;
17
+
end split;
18
+
```
19
+
20
+
## Motivation
21
+
22
+
Studio Pro represents enumeration decisions as exclusive splits whose outgoing sequence flows carry enumeration case values. Without a first-class MDL statement, describe/exec round-trips collapse those structures into boolean-looking decisions or unsupported comments.
23
+
24
+
## Semantics
25
+
26
+
`split enum` evaluates an enumeration variable or attribute path. Each `case` lists one or more enumeration values that enter the same branch. `(empty)` represents the Mendix empty enumeration case. `else` is optional and maps to the outgoing flow without an explicit case value.
27
+
28
+
## Tests And Examples
29
+
30
+
`mdl-examples/doctype-tests/enum_split_statement.test.mdl` demonstrates parser syntax. Go regression tests cover AST parsing, builder generation of enumeration case flows, and describer output for existing split graphs.
31
+
32
+
## Open Questions
33
+
34
+
- Should the builder validate case values against the referenced enumeration when backend metadata is available?
35
+
- Should enum value names be emitted fully qualified in ambiguous cross-module cases?
|[Page Composition](proposal_page_composition.md)| Proposed | Fragment definitions and ALTER PAGE for partial page editing | Page Syntax V2, Page Styling |
49
49
|[XPath Gaps](xpath-gaps-proposal.md)| Partial | XPath constraint support gap analysis. ~85% complete, association paths and nested predicates remain | — |
0 commit comments