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
feat: add IMPORT FROM MAPPING and EXPORT TO MAPPING microflow actions
Full read+write support for import/export mapping actions in microflows:
$Pet = IMPORT FROM MAPPING Module.IMM($JsonString);
$Json = EXPORT TO MAPPING Module.EMM($Pet);
Import assignment is optional (persistent entities store directly to DB).
Implementation: grammar rules, AST types, visitor, executor builder
(auto-resolves entity type and single/list from JSON structure), BSON
writer (ImportMappingCall with ResultHandling, StringExport with
MappingRequestHandling), and BSON parser for DESCRIBE roundtrip.
Also updates: MDL quick reference, feature matrix, help topics (rest,
integration), skill doc, docs-site REST integration page, and doctype
test examples with 3 executable microflows.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/skills/mendix/rest-call-from-json.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,46 @@ END;
133
133
134
134
---
135
135
136
+
## Step 5 — Import/Export Mapping in Microflows (Optional)
137
+
138
+
Instead of using `RETURNS MAPPING` on a REST CALL, you can use standalone import/export mapping actions. This is useful when you already have a JSON string and want to map it to entities, or when you want to serialize entities back to JSON.
139
+
140
+
### Import from mapping
141
+
142
+
Applies an import mapping to a string variable (JSON content) to produce entity objects:
143
+
144
+
```sql
145
+
-- With assignment (non-persistent entities, need the result in the flow)
146
+
$PetResponse = IMPORT FROM MAPPING Module.IMM_Pet($JsonContent);
147
+
148
+
-- Without assignment (persistent entities, just stores to DB)
149
+
IMPORT FROM MAPPING Module.IMM_Pet($JsonContent);
150
+
```
151
+
152
+
### Export to mapping
153
+
154
+
Applies an export mapping to an entity object to produce a JSON string:
155
+
156
+
```sql
157
+
$JsonOutput = EXPORT TO MAPPING Module.EMM_Pet($PetResponse);
0 commit comments