-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary
CREATE WORKFLOW successfully creates workflows in the MPR, but Studio Pro reports multiple validation errors (CE-series) because several required properties are not populated or configurable via the current MDL syntax.
Test Environment
- Mendix version: 11.6.4
- mxcli: latest
Reproduction
Script (tests/workflow-roundtrip-create.mdl):
CREATE WORKFLOW WFTest.Sub_Workflow
PARAMETER $WorkflowContext: WFTest.Entity
BEGIN
END WORKFLOW;
/
CREATE WORKFLOW WFTest.Workflow
PARAMETER $WorkflowContext: WFTest.Entity
BEGIN
USER TASK userTask1 'User Task'
OUTCOMES '' { };
USER TASK userTask2 'Multi-user Task'
OUTCOMES '' { };
CALL MICROFLOW WFTest.Microflow
OUTCOMES Default -> { };
PARALLEL SPLIT
PATH 1 {
USER TASK userTask4 'User Task'
OUTCOMES '' { };
}
PATH 2 {
USER TASK userTask5 'User Task'
OUTCOMES '' { };
};
DECISION '$WorkflowInstance/Name=''xxx'''
OUTCOMES
True -> {
JUMP TO userTask1;
}
False -> {
PARALLEL SPLIT
PATH 1 { }
PATH 2 { }
PATH 3 {
WAIT FOR NOTIFICATION;
WAIT FOR TIMER;
WAIT FOR TIMER;
CALL WORKFLOW WFTest.Sub_Workflow;
USER TASK userTask3 'User Task'
OUTCOMES '' { };
};
};
END WORKFLOW;
/Execution succeeds, but mx check / Studio Pro reports:
Errors Found
| # | Error | Element | Issue |
|---|---|---|---|
| 1 | CE1850 | Parameter 'WorkflowContext' (both workflows + RTTest.SimpleWorkflow) | Workflow context property is required — PARAMETER does not bind the context entity |
| 2 | CE0495 | userTask1, Parallel split, Wait for timer | Duplicate names — auto-generated display names collide |
| 3 | CE7247 | "Parallel split", "Wait for timer" | Invalid names — display names with spaces are not valid identifiers |
| 4 | CE0126 | Call microflow 'Microflow' | Missing parameter value — Entity parameter not bound |
| 5 | CE0126 | Timer x2 | Missing timer duration/expression |
| 6 | CE6680 | Jump 'userTask1' | Target property is required — JUMP TO doesn't resolve target |
| 7 | CE1871 | Call workflow 'Sub_Workflow' | Sub-workflow parameters changed, need update |
Root Causes & Suggestions
1. CE1850 — Workflow context not bound
PARAMETER $WorkflowContext: WFTest.Entity is parsed but the context entity association is not set in the MPR.
Suggestion: Ensure PARAMETER correctly populates the WorkflowContext property.
2. CE0495 / CE7247 — Duplicate/invalid names
Activities like PARALLEL SPLIT, WAIT FOR TIMER get auto-named with spaces ("Parallel split", "Wait for timer"). When multiple exist, names collide.
Suggestion: Support explicit naming syntax, e.g.:
PARALLEL SPLIT parallelSplit1 -- Parallel Split
WAIT FOR TIMER timer1;
WAIT FOR TIMER timer2;3. CE0126 — Missing parameter bindings
CALL MICROFLOW doesn't bind microflow parameters. WAIT FOR TIMER doesn't set timer expression.
Suggestion: Support parameter binding:
CALL MICROFLOW WFTest.Microflow (Entity = $WorkflowContext)
OUTCOMES Default -> { };
WAIT FOR TIMER timer1 DURATION 'P1D'; -- ISO 86014. CE6680 — JUMP TO target not resolved
JUMP TO userTask1 is parsed but the target reference is not linked in the MPR.
5. CE1871 — CALL WORKFLOW parameter sync
Sub-workflow parameters are not synchronized with the caller.
Impact
CREATE WORKFLOW currently produces workflows that cannot pass mx check without manual Studio Pro intervention. The DESCRIBE output of existing workflows is complete and correct, but the round-trip (DESCRIBE → CREATE) is broken for complex workflows.