|
| 1 | +-- ============================================================================ |
| 2 | +-- Bug #264: Log node expressions and microflow describe roundtrip |
| 3 | +-- ============================================================================ |
| 4 | +-- |
| 5 | +-- Three related regressions surfaced together while exercising real .mpr files: |
| 6 | +-- |
| 7 | +-- 1. Legacy `NewCaseValue` on sequence flows (Mx 9) was being dropped by the |
| 8 | +-- parser, so re-describing a Mx 9 project silently lost decision labels. |
| 9 | +-- 2. The describer bailed or emitted malformed MDL when it hit partially |
| 10 | +-- understood activity shapes — a single unknown subfield broke the entire |
| 11 | +-- microflow roundtrip. |
| 12 | +-- 3. The MDL grammar didn't accept the `log` activity's expression-typed NODE |
| 13 | +-- parameter, so any microflow containing a log node with a variable or |
| 14 | +-- constant reference failed to re-parse after describe. |
| 15 | +-- |
| 16 | +-- Usage: |
| 17 | +-- mxcli exec mdl-examples/bug-tests/264-log-node-expression-roundtrip.mdl -p app.mpr |
| 18 | +-- Then: mxcli describe microflow BugTest264.MF_LogWithNode -p app.mpr |
| 19 | +-- The output must re-execute cleanly against the same project. |
| 20 | +-- ============================================================================ |
| 21 | + |
| 22 | +create module BugTest264; |
| 23 | + |
| 24 | +-- String-literal node (backwards-compatible shape) |
| 25 | +create microflow BugTest264.MF_LogWithLiteralNode () |
| 26 | +begin |
| 27 | + log info node 'BugTest264' 'started'; |
| 28 | +end; |
| 29 | +/ |
| 30 | + |
| 31 | +-- Variable-ref node — exercises Node expression path |
| 32 | +create microflow BugTest264.MF_LogWithNode ( |
| 33 | + $nodeName: string |
| 34 | +) |
| 35 | +begin |
| 36 | + log info node $nodeName 'hello'; |
| 37 | +end; |
| 38 | +/ |
| 39 | + |
| 40 | +-- Multi-line message with embedded newline — exercises the mdlQuote escape |
| 41 | +-- round-trip (`\n` is decoded on parse, re-encoded on describe). |
| 42 | +create microflow BugTest264.MF_LogMultilineMessage () |
| 43 | +begin |
| 44 | + log info node 'BugTest264' 'line 1\nline 2\nline 3'; |
| 45 | +end; |
| 46 | +/ |
0 commit comments