Skip to content

CREATE OR MODIFY MICROFLOW with attribute CHANGE corrupts MPR (invalid AttributeIdentifier); passes all mxcli checks but Studio Pro won't open #617

@Chendodelangen

Description

@Chendodelangen

Summary

CREATE OR MODIFY MICROFLOW silently corrupts the .mpr when the microflow body contains an object attribute CHANGE (or CREATE with attribute assignments). The attribute is serialized as a plain string instead of a valid AttributeIdentifier. All mxcli validation (check, check --references, lint, exec) passes, but Studio Pro then refuses to open the project.

Association CHANGE (e.g. CHANGE $X (Module.Assoc = $Y)) serializes fine — only attribute references break.

Environment

  • mxcli version: v0.11.0 (2026-05-21T18:04:46Z)
  • Mendix version: 10.24.15.93102
  • Diagnostic bundle available: yes — mxcli-diag-20260601-131705.tar.gz

Steps to reproduce

Take any existing microflow that sets an attribute and re-create it via MDL:

CREATE OR MODIFY MICROFLOW MyModule.TestFlow (
  "$Obj": MyModule.SomeEntity
)
BEGIN
  CHANGE $Obj (SomeAttribute = 'value');
  RETURN;
END;
/
  1. mxcli check script.mdl -p App.mpr --referencespasses
  2. mxcli lint -p App.mprpasses
  3. mxcli exec script.mdl -p App.mpr → reports Replaced/Created microflow successfully
  4. Open the project in Studio Pro

Expected behaviour

The CHANGE activity stores a valid AttributeIdentifier for SomeAttribute, and the project opens normally.

Actual behaviour

Studio Pro refuses to open the project:

It is not possible to open the project file '...mpr', because it has an invalid format.
Usually this issue is caused by setting invalid property values in the project with the Mendix Model SDK.

Change in microflow 'MyModule.TestFlow' has an invalid value 'SomeAttribute' for property Attribute.
The text 'SomeAttribute' is not a valid AttributeIdentifier.
   at Mendix.Modeler.DomainModels.AttributeIdentifier.FromString(String text)

mxcli never flags this — the corruption only surfaces in Studio Pro.

Impact

  • Silent corruption: the tooling reports success, so it is only discovered when a developer next opens Studio Pro.
  • Recovery requires restoring the model from version control (the model is MPR v2 / mprcontents/*.mxunit).

Secondary observation (possibly related / separate issue)

CREATE OR MODIFY MICROFLOW on an existing microflow assigns new GUIDs to its parameters. Every caller that maps those parameters (e.g. action buttons / data views on pages calling the microflow) then breaks with CE1613 "The selected parameter '...' no longer exists.". This makes it risky to edit any microflow that already has callers. If intended, documenting it (and/or preserving parameter identities on modify) would help.

Workaround

Perform all object creation / attribute mutation in a Java action (Core API instantiate / setValue resolve members at runtime, so nothing invalid is stored), and avoid CREATE OR MODIFY MICROFLOW on microflows that contain attribute CHANGE/CREATE or that already have callers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions