Skip to content

DESCRIBE WORKFLOW emits annotation statements that mxcli check rejects with MDL-WF04 #1007

Description

@MendixMau

Summary

DESCRIBE WORKFLOW emits annotation '<text>'; statements for canvas annotations placed in Studio Pro. mxcli's own checker then rejects those statements with MDL-WF04, on the grounds that writing them produces a model Studio Pro cannot load.

So the emitter produces a construct the validator is designed to refuse. DESCRIBE WORKFLOW output is not re-executable for any workflow carrying canvas annotations, and the failure appears only after the user has already tried to reuse the output.

Environment

  • mxcli v0.20.0 (2026-08-28T13:22:53Z), mxcli-darwin-arm64 from the tagged v0.20.0 release
  • Mendix model version 11.13.0
  • macOS (darwin arm64)

Steps to reproduce

  1. In Studio Pro, open any workflow and drop an annotation onto the canvas next to an activity. Save.
  2. $ mxcli -p App.mpr -c "DESCRIBE WORKFLOW MyModule.MyWorkflow" > rt.mdl
    $ grep -n "annotation" rt.mdl
    35:  annotation 'Source: Receive + Set busState = New Opening';
    
  3. $ mxcli check rt.mdl
    ✓ Syntax OK (1 statements)
    
    ✗ a standalone `annotation` in a workflow body produces a model Mendix cannot load
      (the annotation is placed in the activity flow, which accepts only flow elements)
      — Studio Pro will not open the project  [MDL-WF04]
        at MyModule.MyWorkflow
        → Remove the `annotation` statement. Use an MDL comment (`-- ...`) to keep the
          note in the script; workflow canvas annotations are not yet writable.
    

On a real 23-activity workflow this produced 13 MDL-WF04 errors from unmodified DESCRIBE output.

Expected

Either:

  1. Emit annotations as MDL comments (-- Source: Receive + Set busState = New Opening), matching MDL-WF04's own remediation advice, so describe output round-trips and the note survives as text; or
  2. Support writing workflow canvas annotations correctly, and relax MDL-WF04 accordingly.

Option 1 is the smaller change and makes DESCRIBE WORKFLOW output re-executable today. Its cost is that annotations are dropped on a rebuild, which is worth stating explicitly in the emitted comment.

Actual

Annotations are emitted as annotation statements that mxcli check refuses, so the describe output cannot be used without hand-stripping every one of them first.

Note

Reported separately from the targeting users xpath quote-doubling defect (a string-escaping bug in the same emitter) because the fix lives in a different place: this one is a decision about whether annotations are emitted as statements, as comments, or made writable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions