Problem
A CHANGE $var (Module.AssocName = $other) statement roundtrips through describe→exec→describe as change $var ( = $other) — invalid MDL that cannot be re-executed — when the builder cannot determine the entity type of $var.
Repro
Control Centre (Mendix 9.24), microflow MxKafka.IVK_RetrieveMessages:
$Messages = call java action MxKafka.GetMessagesFromOffset(...);
loop $IteratorMessage in $Messages begin
change $IteratorMessage (MxKafka.Message_MessageOverview = $MessageOverview);
end loop;
After describe → exec → describe, the change line becomes:
change $IteratorMessage ( = $MessageOverview);
The BSON written to the MPR has "Association": "" (empty string) and no "Attribute" key at all.
Root cause
resolveMemberChange in mdl/executor/cmd_microflows_builder_actions.go returns early when entityQN == "", leaving both AssociationQualifiedName and AttributeQualifiedName empty. The writer then emits the empty Association field, and the describer has no name to render.
The empty-entity case is hit whenever a variable's type isn't in fb.varTypes — typically when the variable is the iterator of a loop whose list came from a java action (or any other action) whose return type the builder didn't register.
Trigger conditions
- Any
CHANGE $var (...) where:
$var is not a parameter / not a DECLARE-d variable / not the output of a retrieve/create
- OR
$var comes from a call whose return type the builder doesn't track
- AND the changed member is a qualified association name (
Module.AssocName)
Bare-attribute names (Offset, Name, etc.) don't hit the same path — they resolve by default.
Fix
PR #TODO proposes a shape-based fallback in resolveMemberChange for the unknown-entity case:
- 0 dots → bare attribute name (preserved on
AttributeQualifiedName)
- 1 dot →
Module.Assoc → association (preserved on AssociationQualifiedName)
- ≥2 dots →
Module.Entity.Attribute → qualified attribute (preserved on AttributeQualifiedName)
Five regression tests in cmd_microflows_change_unknown_entity_test.go cover each branch plus the empty-member-name defensive guard.
Validation
go test ./... passes
go test -race ./mdl/executor/ passes
- Control Centre (Mendix 9.24)
describe → exec → describe of MxKafka.IVK_RetrieveMessages now preserves the full member name bit-exactly on the change line. Other residual drifts in the same microflow (retrieve compact/expanded form ambiguity, loop-begin missing keyword) are pre-existing and unrelated to this fix.
Problem
A
CHANGE $var (Module.AssocName = $other)statement roundtrips through describe→exec→describe aschange $var ( = $other)— invalid MDL that cannot be re-executed — when the builder cannot determine the entity type of$var.Repro
Control Centre (Mendix 9.24), microflow
MxKafka.IVK_RetrieveMessages:After
describe→exec→describe, the change line becomes:The BSON written to the MPR has
"Association": ""(empty string) and no"Attribute"key at all.Root cause
resolveMemberChangeinmdl/executor/cmd_microflows_builder_actions.goreturns early whenentityQN == "", leaving bothAssociationQualifiedNameandAttributeQualifiedNameempty. The writer then emits the emptyAssociationfield, and the describer has no name to render.The empty-entity case is hit whenever a variable's type isn't in
fb.varTypes— typically when the variable is the iterator of a loop whose list came from a java action (or any other action) whose return type the builder didn't register.Trigger conditions
CHANGE $var (...)where:$varis not a parameter / not a DECLARE-d variable / not the output of a retrieve/create$varcomes from a call whose return type the builder doesn't trackModule.AssocName)Bare-attribute names (
Offset,Name, etc.) don't hit the same path — they resolve by default.Fix
PR #TODO proposes a shape-based fallback in
resolveMemberChangefor the unknown-entity case:AttributeQualifiedName)Module.Assoc→ association (preserved onAssociationQualifiedName)Module.Entity.Attribute→ qualified attribute (preserved onAttributeQualifiedName)Five regression tests in
cmd_microflows_change_unknown_entity_test.gocover each branch plus the empty-member-name defensive guard.Validation
go test ./...passesgo test -race ./mdl/executor/passesdescribe→exec→describeofMxKafka.IVK_RetrieveMessagesnow preserves the full member name bit-exactly on the change line. Other residual drifts in the same microflow (retrieve compact/expanded form ambiguity, loop-begin missing keyword) are pre-existing and unrelated to this fix.