Skip to content

Microflow read/write round-trip drops fields, and default auto-layout misplaces elements #723

Description

@MohamedGamalEzzatAli

Summary

Two related classes of microflow defects in the modelsdk engine, all reproducible
and verified against Studio Pro's own checker (mx check) on Mendix 11.6.7.

A. Read/write round-trip fidelity (affects any UpdateMicroflow caller)

UpdateMicroflow parses → semantic model → re-serializes. Several fields are
silently lost on the way through:

Symptom (Studio Pro) Cause
CE4899 "concurrent execution: error message or microflow required" read path never reads back AllowConcurrentExecution/MarkAsUsed, so the round-trip resets them to false
Every decision/activity renders as a 1‑px sliver (caption wraps one letter per line). No mx check error — it ignores box size read path carries Position but not Size, so nodes are rewritten with size 0;0
CE0080 "Condition property required", then CE0113 "rule property required", on rule‑based decisions splitConditionToGen has no RuleSplitCondition case (condition dropped); and the rule ref is written under the Rule key while Mendix stores it under Microflow
CE0117 "Error in expression" when creating a rule‑based decision from MDL the modelsdk backend never implements IsRule, so the builder emits an invalid ExpressionSplitCondition for if Module.SomeRule(...)

B. Default auto-layout element placement

When MDL omits @position, the generated diagram places elements poorly:
parameters overlap the flow; the start event sits too far left; an exclusive
merge can land to the right of the node it feeds (a backward, right‑to‑left
connector); and the single end event is not the right‑most object.

Proposed fix

  • Read back AllowConcurrentExecution/MarkAsUsed and node Size.
  • Serialize RuleSplitCondition and store the rule ref under the Microflow
    key (matching the repo's existing propertyKeyOverrides-patch convention).
  • Implement IsRule on the modelsdk backend.
  • buildFlowGraph: parameter row above the flow, start‑event gap, fixed‑point
    merge clamp, right‑most single end event.

Verified with mx check (0 errors) and the modelsdk test suite. A branch is
ready; happy to open a PR. Filed on behalf of Omnix International LLC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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