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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
18
18
-**OpenAPI import for REST clients** — `CREATE REST CLIENT` now accepts `OpenAPI: 'path/or/url'` to auto-generate a consumed REST service document from an OpenAPI 3.0 spec (JSON or YAML); operations, path/query parameters, request bodies, response types, resource groups (tags), and Basic auth are derived automatically; spec content is stored in `OpenApiFile` for Studio Pro parity (#207)
19
19
-**DESCRIBE CONTRACT OPERATION FROM OPENAPI** — Preview what would be generated from an OpenAPI spec without writing to the project
20
20
21
-
-**Nanoflow bug fixes** — Module existence validation for SHOW NANOFLOWS/MICROFLOWS, numeric return literals no longer get spurious `$` prefix, empty nanoflow/microflow names rejected at create time, `NanoflowCallAction` error handling type resolved correctly, `not()` expression spacing preserved on roundtrip, JavaScript action call rendering in DESCRIBE output
21
+
-**Flow bug fixes** — Module existence validation for SHOW NANOFLOWS and SHOW MICROFLOWS, numeric return literals no longer get spurious `$` prefix, empty flow names rejected at create time, `NanoflowCallAction` error handling type resolved correctly, `not()` expression spacing preserved on roundtrip, JavaScript action call rendering in DESCRIBE output
22
22
-**Nanoflow diff support** — `mxcli diff` now detects and displays nanoflow changes (previously silently skipped)
23
+
-**Nanoflow validation parity** — `mxcli check` now runs full body validation on nanoflows (undeclared variables, missing returns, branch scoping) via shared `validateFlowBody` helper; `allNames()` includes nanoflows for forward-reference detection
24
+
-**DownloadFileStmt denylist** — `DOWNLOAD FILE` added to nanoflow disallowed action list
23
25
-**JavaScript action MDL syntax** — `call javascript action Module.ActionName(params)` now fully supported in CREATE NANOFLOW/MICROFLOW bodies: grammar, parser, builder, serializer, and roundtrip
-**Flow builder cache** — `lookupMicroflowReturnType` and `lookupNanoflowReturnType` now cache results with lazy-load bool flags, avoiding repeated `ListNanoflows`/`ListMicroflows` calls; nanoflow lookup uses `GetRawUnitByName` fast path
28
+
-**Parser fixes** — Negative literals no longer greedily consumed by lexer (`-?` removed from `NUMBER_LITERAL`); XPath multi-predicate brackets correctly split and re-wrapped; multi-line string literals in change/create object expressions escaped; `ExclusiveSplit` (if/else) inside loop bodies now emits correct `end if;`
29
+
-**Empty action params** — JS and Java action parameters with empty/nil values are omitted from DESCRIBE output instead of rendering as `...` or bare `= )`
24
30
-**Association retrieve roundtrip fidelity** — `retrieve $X from $Y/Module.Association` syntax preserved on roundtrip (previously converted to `from Entity where Assoc = $Y`)
25
31
-**DESCRIBE empty-then optimization** — If/else blocks with empty true branches are swapped and condition negated for readable output
-`IMPORT FROM MAPPING` / `EXPORT TO MAPPING` — mapping operations are server-side
121
+
-`EXECUTE DATABASE QUERY` — direct SQL requires server
122
+
-`TRANSFORM JSON` — JSON transformations are server-side
123
+
-`SHOW HOME PAGE` — home page navigation is server-side
124
+
-`CALL EXTERNAL ACTION` — external actions are server-side
125
+
- All **workflow actions** (call/open workflow, set task outcome, user task, etc.)
126
+
127
+
> **Note:** Per-action error handling (`on error continue`) IS supported in nanoflows. Only `ErrorEvent` (raise error as a standalone flow action) is forbidden. Note that `on error rollback` is syntactically valid but only rolls back in-memory changes — nanoflows have no database transactions.
Copy file name to clipboardExpand all lines: docs/03-development/MDL_PARSER_ARCHITECTURE.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -515,11 +515,11 @@ The `microflowValidator` struct walks the body and checks:
515
515
4.**Variable scope** — Variables declared inside IF/ELSE branches or ON ERROR bodies cannot be referenced after the branch ends. The `checkBranchScoping()` method collects variables declared inside branches and checks if subsequent statements reference them.
516
516
5.**Validation feedback** — VALIDATION FEEDBACK must have a non-empty message template (CE0091).
517
517
518
-
This is separate from `ValidateMicroflowBody()`(in `cmd_microflows_builder.go`), which checks undeclared variable usage and runs during `--references` validation.
518
+
This is separate from `ValidateMicroflowBody()`and `ValidateNanoflowBody()` (in `cmd_microflows_builder_validate.go`), which check undeclared variable usage and run during `--references` validation. Both delegate to the shared `validateFlowBody()` helper that accepts `[]ast.MicroflowParam` and `[]ast.MicroflowStatement`.
519
519
520
520
## Microflow Builder Architecture
521
521
522
-
The microflow builder (`cmd_microflows_builder.go`) converts MDL microflow AST nodes into Mendix microflow objects. A key aspect is **variable type tracking**.
522
+
The microflow builder (`cmd_microflows_builder.go`) converts MDL microflow AST nodes into Mendix microflow objects. A key aspect is **variable type tracking**. The `flowBuilder` also maintains `microflowsCache`/`nanoflowsCache` (with `Loaded` bool flags) for lazy-cached return type lookups, and `allNames()` includes nanoflows for forward-reference detection in multi-statement scripts.
Copy file name to clipboardExpand all lines: docs/05-mdl-specification/01-language-reference.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -629,7 +629,7 @@ Creates a microflow with activities, parameters, return type, and control flow.
629
629
630
630
**Syntax:**
631
631
```sql
632
-
create [orreplace] microflow <qualified-name>
632
+
create [ormodify] microflow <qualified-name>
633
633
[folder '<path>']
634
634
begin
635
635
[<statements>]
@@ -723,7 +723,7 @@ end;
723
723
**Restrictions:**
724
724
- No `ErrorEvent`, Java action calls, REST/web service calls, workflow actions, import/export mapping actions, or database queries
725
725
- Return type cannot be `Binary`
726
-
- Activities are the same as microflows minus server-side-only actions (see `PROPOSAL_nanoflow_support.md` for the full list of 20 disallowed action types)
726
+
- Activities are the same as microflows minus server-side-only actions (see `PROPOSAL_nanoflow_support.md` for the full list of 22 disallowed action types)
**Disallowed** (32+ actions): All Java actions, REST calls, workflow actions, import/export, external object ops, download file, push to client, show home page, email, document generation, metrics, ML model calls.
36
+
**Disallowed** (enforced by `checkDisallowedNanoflowAction` in `nanoflow_validation.go`, 12 case branches covering 22 action types): RaiseError/ErrorEvent, JavaActionCall, RestCall, SendRestRequest, ImportFromMapping, ExportToMapping, CallExternalAction, DownloadFile, ShowHomePage, TransformJson, ExecuteDatabaseQuery, and 11 workflow action types (CallWorkflow, GetWorkflowData, GetWorkflows, GetWorkflowActivityRecords, WorkflowOperation, SetTaskOutcome, OpenUserTask, NotifyWorkflow, OpenWorkflow, LockWorkflow, UnlockWorkflow).
Test plan: `docs/15-testing/nanoflow-test-cases.md` (19 sections, 100+ test cases covering all commands, validation, BSON round-trip, catalog, and edge cases).
0 commit comments