-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary
DESCRIBE WORKFLOW output is incomplete and contains non-executable comments, making it impossible to use DESCRIBE output as input for a round-trip (describe → exec → check cycle).
Discovered by reading all workflows from a baseline project with SHOW WORKFLOWS / DESCRIBE WORKFLOW.
Problems Found
1. End-of-path activities rendered as noisy comments
-- [Workflows$EndOfParallelSplitPathActivity] End of parallel split path
-- [Workflows$EndOfBoundaryEventPathActivity] End of boundary path
These are Mendix-internal activities and should be silently skipped in DESCRIBE output (like StartWorkflowActivity and EndWorkflowActivity already are).
2. Activity annotations rendered with noisy prefix
-- [Annotation] I am a note
Should be emitted as a plain comment: -- I am a note
3. WAIT FOR TIMER missing delay expression
-- Before (broken):
WAIT FOR TIMER;
-- After (correct):
WAIT FOR TIMER 'addDays([%CurrentDateTime%], 1)';Root cause: parser was reading DelayExpression BSON field instead of the correct Delay field.
4. Boundary event timer missing duration
-- Before (broken):
NonInterruptingTimer -- AnTimerEvent
-- After (correct):
NonInterruptingTimer TIMER 'addDays([%CurrentDateTime%], 1)' -- AnTimerEventRoot cause: parser was reading DelayExpression instead of FirstExecutionTime.
5. USER TASK outcomes showed empty string
-- Before (broken):
OUTCOMES
'' { };
-- After (correct):
OUTCOMES
'Approved' { };Root cause: parser was not reading the Value field of UserTaskOutcome.
6. USER TASK missing page
-- Before (broken):
USER TASK rtTask1 'Approve'
OUTCOMES ...
-- After (correct):
USER TASK rtTask1 'Approve'
PAGE Module.TaskPage
OUTCOMES ...Root cause: parser was not handling the nested Workflows$PageReference object structure.
7. BoundaryEvents array marker wrong
BSON writer was using int32(3) for BoundaryEvents, but the correct marker is int32(2).
Verified Fix
Round-trip test after fixes — mx check: 0 errors:
CREATE WORKFLOW WorkflowBaseline.RoundtripTestWF
PARAMETER $WorkflowContext: WorkflowBaseline.Entity
BEGIN
USER TASK rtTask1 'Approve'
PAGE WorkflowBaseline.Page
OUTCOMES
'Approved' { }
'Rejected' { };
PARALLEL SPLIT
PATH 1 { WAIT FOR TIMER 'addDays([%CurrentDateTime%], 7)'; }
PATH 2 { WAIT FOR TIMER 'addDays([%CurrentDateTime%], 1)'; };
DECISION '$WorkflowContext/Attribute = ''done'''
OUTCOMES
True -> { }
False -> { WAIT FOR TIMER 'addDays([%CurrentDateTime%], 3)'; };
END WORKFLOWDESCRIBE output matches input exactly for all tested features.
Remaining Limitations
WAIT FOR NOTIFICATION— no MDL syntax for notification target entity- Standalone canvas Annotations — writer does not support creating them via MDL
- USER TASK
DueDate/UserTargeting— parsed but not yet emitted by DESCRIBE