fix: handle System entity types and RETURN keyword formatting in microflows#29
fix: handle System entity types and RETURN keyword formatting in microflows#29ako merged 1 commit intomendixlabs:mainfrom
Conversation
…oflows Skip entity validation for built-in System module types (System.Workflow, System.User, etc.) since they are not stored in MPR domain models. Fix RETURN formatting to avoid prefixing Mendix keywords (empty, true, false, null) with "$". Fix ReturnVariableName default to "" and HasVariableNameBeenChanged to false to match Studio Pro conventions.
ako
left a comment
There was a problem hiding this comment.
Code Review: fix: handle System entity types and RETURN keyword formatting
4 files, +58/-12, single commit. Three targeted fixes, all correct.
-
System entity validation skip —
isBuiltinModuleEntity("System")bypasses entity resolution for runtime-only types (System.Workflow,System.User, etc.). Applied consistently to both parameters and return type. -
RETURN keyword formatting —
isMendixKeyword()preventsempty,true,false,nullfrom being prefixed with$. Also trims trailing\nfromReturnValue. -
Writer defaults —
ReturnVariableNamechanged from"Variable"to"",HasVariableNameBeenChangedfromtruetofalse. Matches Studio Pro conventions. -
Test —
TestRoundtripMicroflow_SystemEntityParametercovers all three fixes with positive and negative assertions.
Minor note: the strings.TrimSuffix(activity.ReturnValue, "\n") is a drive-by fix not mentioned in the PR description — harmless but worth noting.
Looks good.
🤖 Generated with Claude Code
Summary
System.Workflow,System.User, etc.) since they are resolved at runtime and not stored in MPR domain modelsempty,true,false,null) with$ReturnVariableNamedefault from"Variable"to""andHasVariableNameBeenChangedfromtruetofalseto match Studio Pro conventionsTest plan
TestRoundtripMicroflow_SystemEntityParametercovering System entity params, return type, andRETURN emptykeyword formattingmake testmx checkon a project using System entity microflow parameters🤖 Generated with Claude Code