Skip to content

fix: handle System entity types and RETURN keyword formatting in microflows#29

Merged
ako merged 1 commit intomendixlabs:mainfrom
engalar:feat/mf-improve
Mar 25, 2026
Merged

fix: handle System entity types and RETURN keyword formatting in microflows#29
ako merged 1 commit intomendixlabs:mainfrom
engalar:feat/mf-improve

Conversation

@engalar
Copy link
Copy Markdown
Contributor

@engalar engalar commented Mar 25, 2026

Summary

  • Skip entity validation for built-in System module types (System.Workflow, System.User, etc.) since they are resolved at runtime and not stored in MPR domain models
  • Fix RETURN formatting to avoid prefixing Mendix keywords (empty, true, false, null) with $
  • Fix ReturnVariableName default from "Variable" to "" and HasVariableNameBeenChanged from true to false to match Studio Pro conventions

Test plan

  • Added TestRoundtripMicroflow_SystemEntityParameter covering System entity params, return type, and RETURN empty keyword formatting
  • Run full test suite: make test
  • Verify with mx check on a project using System entity microflow parameters

🤖 Generated with Claude Code

…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.
Copy link
Copy Markdown
Collaborator

@ako ako left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: fix: handle System entity types and RETURN keyword formatting

4 files, +58/-12, single commit. Three targeted fixes, all correct.

  1. System entity validation skipisBuiltinModuleEntity("System") bypasses entity resolution for runtime-only types (System.Workflow, System.User, etc.). Applied consistently to both parameters and return type.

  2. RETURN keyword formattingisMendixKeyword() prevents empty, true, false, null from being prefixed with $. Also trims trailing \n from ReturnValue.

  3. Writer defaultsReturnVariableName changed from "Variable" to "", HasVariableNameBeenChanged from true to false. Matches Studio Pro conventions.

  4. TestTestRoundtripMicroflow_SystemEntityParameter covers 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

@ako ako merged commit 944e408 into mendixlabs:main Mar 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants