Skip to content

bug: DESCRIBE MICROFLOW omits WHILE loop body activities #18

@engalar

Description

@engalar

Summary

DESCRIBE MICROFLOW outputs the WHILE loop condition but completely omits all activities inside the loop body. This makes DESCRIBE output non-roundtrippable for any microflow containing a WHILE loop.

Repro

CREATE MICROFLOW MathTest.Fibonacci (
  $N: Integer
) RETURNS Long AS $Result (
  DECLARE $Result Long = 0
  DECLARE $Previous1 Long = 0
  DECLARE $Previous2 Long = 1
  DECLARE $Counter Integer = 2
  WHILE $Counter <= $N (
    DECLARE $Current Long = $Previous1 + $Previous2
    SET $Previous2 = $Previous1
    SET $Previous1 = $Current
    SET $Counter = $Counter + 1
  )
  RETURN $Result
);

Expected DESCRIBE output: includes $Current, SET, counter increment inside the WHILE block.

Actual DESCRIBE output:

WHILE $Counter <= $N (
  -- (empty — body activities missing)
)

Also: DESCRIBE outputs END LOOP; instead of END WHILE; for WHILE loops.

Impact

  • All microflows with WHILE loops have incomplete DESCRIBE output
  • Cannot reconstruct original microflow from DESCRIBE
  • Affects: 02-microflow-examples.mdl, 04-math-examples.mdl

Severity

HIGH — data loss in DESCRIBE roundtrip; affects every WHILE loop.

Discovered via

Automated roundtrip test — mdl-examples/doctype-tests/ (2026-03-25)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions