Skip to content

Commit aafbfae

Browse files
committed
fix: address review comments, add NanoflowCallAction formatter, test plan, docs and proposal update
1 parent 63c4010 commit aafbfae

24 files changed

Lines changed: 3127 additions & 213 deletions

docs/01-project/MDL_FEATURE_MATRIX.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ When adding a new MDL feature, use this matrix as a checklist to ensure complete
1313
| **Associations** | Y | Y | Y | N | Y | Y | 01 | Y | N | Y | Y | Y | Y | Y | Y | Y | N |
1414
| **Enumerations** | Y | Y | Y | Y | Y | Y | 01 | Y | Y | N | Y | Y | Y | N | Y | Y | Y |
1515
| **Microflows** | Y | Y | Y | Y | Y | N | 02 | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
16-
| **Nanoflows** | Y | N | N | N | N | N | N | N | Y | Y | Y | N | Y | N | P | N | N |
16+
| **Nanoflows** | Y | Y | Y | Y | Y | N | N | N | Y | Y | Y | Y | Y | Y | P | N | N |
1717
| **Pages** | Y | Y | Y | N | Y | Y | 03 | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
1818
| **Snippets** | Y | Y | Y | N | Y | Y | 03 | Y | Y | Y | Y | Y | Y | N | Y | Y | Y |
1919
| **Layouts** | Y | Y | N | N | N | N | N | N | Y | Y | Y | N | Y | N | Y | N | N |
@@ -37,6 +37,7 @@ When adding a new MDL feature, use this matrix as a checklist to ensure complete
3737
| **Project Security** | Y | - | - | - | - | Y | 08 | Y | Y | Y | Y | Y | Y | N | N | Y | Y |
3838
| **Entity Access** | P | N | Y | P | Y | P | 08 | Y | N | Y | Y | Y | Y | N | N | Y | Y |
3939
| **Microflow Access** | Y | N | Y | P | Y | P | 08 | Y | N | Y | Y | Y | Y | N | N | Y | Y |
40+
| **Nanoflow Access** | Y | N | Y | P | Y | P | N | N | N | Y | Y | N | Y | N | N | N | N |
4041
| **Page Access** | Y | N | Y | P | Y | P | 08 | Y | N | Y | Y | Y | Y | N | N | Y | Y |
4142

4243
## Project Organization
@@ -123,7 +124,7 @@ These types are not covered in `help.go` output:
123124

124125
### Missing Skills
125126

126-
- **Nanoflows**No dedicated skill (covered partially by microflow skill)
127+
- **Nanoflows**Dedicated skill exists (`write-nanoflows.md`); also partially covered by microflow skill
127128
- **Layouts** — Read-only, no skill needed
128129
- **Constants** — No dedicated skill
129130

@@ -170,12 +171,12 @@ Mermaid diagram support (`mxcli describe --format mermaid` + VS Code "Show Diagr
170171

171172
- **Domain Model** (Entities/Associations) — `erDiagram` with attributes, cardinality, generalizations
172173
- **Microflows**`flowchart TD` with activities, splits, merge points, case labels
174+
- **Nanoflows**`flowchart TD` with activities, splits, merge points (same logic as microflows)
173175
- **Pages**`block-beta` with widget tree structure
174176

175177
Not yet implemented:
176178

177179
- **Enumerations** — Could render as a simple table or list diagram
178-
- **Nanoflows** — Same flowchart logic as microflows, not yet wired up
179180
- **Snippets** — Same widget tree logic as pages, not yet wired up
180181
- **Call graphs**`show context of` / `show callers of` as directed graphs
181182
- **Module overview** — Combined ER + dependency diagram
@@ -186,9 +187,7 @@ Document types that exist in Mendix but have no MDL support:
186187

187188
| Feature | SHOW | DESCRIBE | CREATE | OR MODIFY | DROP | ALTER | Examples | Tests | Catalog | REFS | LSP | Skills | Help | Viz | REPL | Syntax | Starlark | Notes |
188189
|---------|------|----------|--------|-----------|------|-------|----------|-------|---------|------|-----|--------|------|-----|------|--------|----------|-------|
189-
| **Nanoflow CREATE** | Y | N | **N** | N | N | N | N | N | Y | Y | Y | N | Y | N | P | N | N | SHOW works; DESCRIBE/CREATE/DROP not implemented |
190190
| **Microflow activities** | - | - | P | - | - | - | 02 | Y | P | P | P | Y | Y | - | - | - | P | 60+ activities supported; some edge cases missing |
191-
| **Mobile nanoflows** | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Mobile-specific nanoflow features |
192191
| **Building blocks** | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Reusable page building blocks |
193192
| **Styling** | P | P | P | N | N | N | N | N | N | N | N | P | N | P | N | N | N | Class/Style/DesignProperties on widgets; full theme system not yet |
194193
| **Extensions** | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | Mendix extensions / add-ons |

docs/01-project/MDL_QUICK_REFERENCE.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ authentication basic, session
205205
| Rename constant | `rename constant Module.Old to New;` | Updates all references |
206206
| Drop microflow | `drop microflow Module.Name;` | |
207207
| Drop nanoflow | `drop nanoflow Module.Name;` | |
208+
| Create nanoflow | `create [or modify] nanoflow Module.Name (params) returns type [folder 'path'] begin ... end nanoflow;` | Same body syntax as microflows |
209+
| Move nanoflow | `move nanoflow Module.Name to folder 'path';` | |
208210

209211
## Microflows - Supported Statements
210212

@@ -275,7 +277,7 @@ Nested folders use `/` separator: `'Parent/Child/Grandchild'`. Missing folders a
275277
| Show module roles | `show module roles [in module];` | All roles or filtered by module |
276278
| Show user roles | `show user roles;` | Project-level user roles |
277279
| Show demo users | `show demo users;` | Configured demo users |
278-
| Show access on element | `show access on microflow\|page\|entity Mod.Name;` | Which roles can access |
280+
| Show access on element | `show access on microflow\|nanoflow\|page\|entity Mod.Name;` | Which roles can access |
279281
| Show security matrix | `show security matrix [in module];` | Full access overview |
280282
| Create module role | `create module role Mod.Role [description 'text'];` | |
281283
| Drop module role | `drop module role Mod.Role;` | |
@@ -284,6 +286,8 @@ Nested folders use `/` separator: `'Parent/Child/Grandchild'`. Missing folders a
284286
| Drop user role | `drop user role Name;` | |
285287
| Grant microflow access | `grant execute on microflow Mod.MF to Mod.Role, ...;` | |
286288
| Revoke microflow access | `revoke execute on microflow Mod.MF from Mod.Role, ...;` | |
289+
| Grant nanoflow access | `grant execute on nanoflow Mod.NF to Mod.Role, ...;` | |
290+
| Revoke nanoflow access | `revoke execute on nanoflow Mod.NF from Mod.Role, ...;` | |
287291
| Grant page access | `grant view on page Mod.Page to Mod.Role, ...;` | |
288292
| Revoke page access | `revoke view on page Mod.Page from Mod.Role, ...;` | |
289293
| Grant entity access | `grant Mod.Role on Mod.Entity (create, delete, read *, write *);` | Additive — merges with existing |

docs/05-mdl-specification/01-language-reference.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,48 @@ Shows the full MDL definition of an existing microflow (round-trippable output).
707707
drop microflow <qualified-name>
708708
```
709709

710+
### CREATE NANOFLOW
711+
712+
Creates a nanoflow (client-side flow). Uses the same body syntax as microflows, but only client-side activities are allowed (no Java actions, REST calls, workflow actions, etc.).
713+
714+
**Syntax:**
715+
```sql
716+
create [or modify] nanoflow <qualified-name>
717+
[folder '<path>']
718+
begin
719+
[<statements>]
720+
end nanoflow
721+
```
722+
723+
**Restrictions:**
724+
- No `ErrorEvent`, Java action calls, REST/web service calls, workflow actions, import/export mapping actions, log statements, or database queries
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)
727+
728+
**Example:**
729+
```sql
730+
create nanoflow Shop.ACT_ValidateCart
731+
folder 'Cart'
732+
begin
733+
declare $Valid boolean = true;
734+
if $Cart/ItemCount = 0 then
735+
validation feedback $Cart/ItemCount message 'Cart is empty';
736+
set $Valid = false;
737+
end if;
738+
return $Valid;
739+
end nanoflow;
740+
```
741+
742+
### DESCRIBE NANOFLOW
743+
744+
Shows the full MDL definition of an existing nanoflow (round-trippable output as `CREATE OR MODIFY NANOFLOW`).
745+
746+
### DROP NANOFLOW
747+
748+
```sql
749+
drop nanoflow <qualified-name>
750+
```
751+
710752
---
711753

712754
## Page Statements
@@ -923,6 +965,7 @@ Shows which roles have access to a specific element.
923965
**Syntax:**
924966
```sql
925967
show access on microflow <module>.<name>
968+
show access on nanoflow <module>.<name>
926969
show access on page <module>.<name>
927970
show access on <module>.<entity>
928971
```
@@ -984,6 +1027,24 @@ Removes execute access on a microflow from one or more module roles.
9841027
revoke execute on microflow <module>.<name> from <module>.<role> [, ...]
9851028
```
9861029

1030+
### GRANT EXECUTE ON NANOFLOW
1031+
1032+
Grants execute access on a nanoflow to one or more module roles.
1033+
1034+
**Syntax:**
1035+
```sql
1036+
grant execute on nanoflow <module>.<name> to <module>.<role> [, ...]
1037+
```
1038+
1039+
### REVOKE EXECUTE ON NANOFLOW
1040+
1041+
Removes execute access on a nanoflow from one or more module roles.
1042+
1043+
**Syntax:**
1044+
```sql
1045+
revoke execute on nanoflow <module>.<name> from <module>.<role> [, ...]
1046+
```
1047+
9871048
### GRANT VIEW ON PAGE
9881049

9891050
Grants view access on a page to one or more module roles.

docs/06-mdl-reference/grammar-reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ createStatement
129129
| | createAssociationStatement
130130
| | createModuleStatement
131131
| | createMicroflowStatement
132+
| | createNanoflowStatement
132133
| | createPageStatement
133134
| | createSnippetStatement
134135
| | createEnumerationStatement

0 commit comments

Comments
 (0)