When a nanoflow calls a JavaScript action that takes an entity-type parameter (i.e. a parameter typed entity <> not null in the JS action definition), mxcli writes the wrong BSON type into the model. Studio Pro shows the entity picker for that parameter as empty.
MDL used:
CREATE OR REPLACE NANOFLOW "CustomModule"."ACT_BufferDefinition_Create_NF" (
$Dto: CustomModule.CreateBufferDefinition
)
Folder 'BufferDefinition/Actions/Create'
BEGIN
CALL MICROFLOW CustomModule.ACT_BufferDefinition_Create ($Dto = $Dto);
CALL JAVASCRIPT ACTION NanoflowCommons.RefreshEntity (EntityToRefresh = CustomModule.BufferDefinition);
CLOSE PAGE;
END;
/
JS action signature (from DESCRIBE JAVASCRIPT ACTION NanoflowCommons.RefreshEntity):
EntityToRefresh: entity <> not null
Actual BSON (generated by mxcli v0.22.0):
{
"$Type": "Microflows$BasicCodeActionParameterValue",
"Argument": "CustomModule.BufferDefinition"
}
Expected BSON (as produced by Studio Pro and by nanoflows created before v0.22.0):
{
"$Type": "Microflows$EntityTypeCodeActionParameterValue",
"Entity": "CustomModule.BufferDefinition"
}
Steps to reproduce
- Create any nanoflow that calls NanoflowCommons.RefreshEntity (or any JS action with an entity type parameter) via CALL JAVASCRIPT ACTION.
- Execute the MDL script with ./mxcli exec.
- Run ./mxcli bson dump --type nanoflow --object "Module.NanoflowName" and inspect the ParameterValue for the entity-type parameter.
- Observe Microflows$BasicCodeActionParameterValue with "Argument": "Module.Entity" instead of Microflows$EntityTypeCodeActionParameterValue with "Entity": "Module.Entity".
Impact
- Studio Pro shows the entity picker as empty for all entity-type JS action parameters written by mxcli.
- The nanoflow appears structurally correct in mxcli output but is silently broken at the model level.
- Workaround: open the nanoflow in Studio Pro, manually select the entity in the parameter picker, and save.
Version: mxcli v0.22.0 (2026-09-14)
Mendix version: 11.12.4
Additional context
Nanoflows created before v0.22.0 (e.g. OpcenterEXFN_ReferenceData.ACT_CreateBaseUoM, OpcenterEXFN_ReferenceData.ACT_CreateCounter) have the correct EntityTypeCodeActionParameterValue BSON. The issue appears to be a regression introduced at some point before or in v0.22.0 — the MDL syntax
(EntityToRefresh = Module.Entity) is identical between old and new nanoflows, but only the old ones produce the correct type.
When a nanoflow calls a JavaScript action that takes an entity-type parameter (i.e. a parameter typed entity <> not null in the JS action definition), mxcli writes the wrong BSON type into the model. Studio Pro shows the entity picker for that parameter as empty.
MDL used:
CREATE OR REPLACE NANOFLOW "CustomModule"."ACT_BufferDefinition_Create_NF" (
$Dto: CustomModule.CreateBufferDefinition
)
Folder 'BufferDefinition/Actions/Create'
BEGIN
CALL MICROFLOW CustomModule.ACT_BufferDefinition_Create ($Dto = $Dto);
CALL JAVASCRIPT ACTION NanoflowCommons.RefreshEntity (EntityToRefresh = CustomModule.BufferDefinition);
CLOSE PAGE;
END;
/
JS action signature (from DESCRIBE JAVASCRIPT ACTION NanoflowCommons.RefreshEntity):
EntityToRefresh: entity <> not null
Actual BSON (generated by mxcli v0.22.0):
{
"$Type": "Microflows$BasicCodeActionParameterValue",
"Argument": "CustomModule.BufferDefinition"
}
Expected BSON (as produced by Studio Pro and by nanoflows created before v0.22.0):
{
"$Type": "Microflows$EntityTypeCodeActionParameterValue",
"Entity": "CustomModule.BufferDefinition"
}
Steps to reproduce
Impact
Version: mxcli v0.22.0 (2026-09-14)
Mendix version: 11.12.4
Additional context
Nanoflows created before v0.22.0 (e.g. OpcenterEXFN_ReferenceData.ACT_CreateBaseUoM, OpcenterEXFN_ReferenceData.ACT_CreateCounter) have the correct EntityTypeCodeActionParameterValue BSON. The issue appears to be a regression introduced at some point before or in v0.22.0 — the MDL syntax
(EntityToRefresh = Module.Entity) is identical between old and new nanoflows, but only the old ones produce the correct type.