Repo: mendixlabs/mxcli
Affects: v0.16.0 (current Latest release) — and, per prior testing, still unfixed on RnD 504aec67
Mendix: 11.13.0
Severity: Medium — model is loadable but carries a hard CE error; the failure is easy to misattribute to DECISION support being broken.
Summary
The workflow context variable is $WorkflowContext. In a CALL MICROFLOW … WITH (…) clause,
1b390dce normalizes the casing of the expression, so a lowercase $workflowContext is accepted.
DECISION expressions get no such normalization — they are stored verbatim, and Mendix then
rejects the unknown variable with CE0117.
This matters because the bundled write-workflows skill documents the lowercase spelling in its
DECISION example, so following the shipped docs produces a CE error.
Reproduction
Two workflows, identical except for the casing of the context variable.
-- E: lowercase, exactly as the bundled skill documents
CREATE WORKFLOW TFC."WF_ProbeE"
PARAMETER $WorkflowContext: TFC."TFCStub"
BEGIN
DECISION '$workflowContext/IsExclusive'
OUTCOMES true -> { } false -> { };
END WORKFLOW;
-- F: correct casing (control)
CREATE WORKFLOW TFC."WF_ProbeF"
PARAMETER $WorkflowContext: TFC."TFCStub"
BEGIN
DECISION '$WorkflowContext/IsExclusive'
OUTCOMES true -> { } false -> { };
END WORKFLOW;
Both pass mxcli check --references and both exec cleanly. Then mx check:
| Workflow |
Stored expression (read from BSON) |
mx check |
| E lowercase |
$workflowContext/IsExclusive — verbatim, not normalized |
[error] [CE0117] "Error(s) in expression." at Decision 'Decision' |
| F correct case |
$WorkflowContext/IsExclusive |
0 errors |
Attribution is clean: with both present the project reports exactly 1 error; dropping E alone
returns it to 0 errors.
Expected
DECISION expressions should get the same context-variable case normalization that
CALL MICROFLOW … WITH already received in 1b390dce — or mxcli check should flag the unknown
variable before exec.
Documentation defect
write-workflows (bundled with v0.16.0) uses the lowercase form in the DECISION example:
decision '$workflowContext/Total > 1000'
outcomes
true -> { call microflow Module.ACT_Escalate; }
false -> { call microflow Module.ACT_AutoApprove; };
Worth fixing regardless of which way the code fix goes.
Note on a related, unverified case
Variant D in the companion report (CALL MICROFLOW … WITH (TFCStub = '$workflowContext'), i.e.
lowercase inside a WITH clause on v0.16.0) stored the expression verbatim as $workflowContext
and still passed mx check with 0 errors. Whether that binds correctly at runtime was not
tested — on Mendix 11.12.1 this exact class of defect was historically silent at check time and
wrong at runtime. Correct casing is the safe recommendation everywhere until that is verified.
Why this was previously misdiagnosed
An earlier local bug entry recorded "DECISION with enum comparison is broken in workflows" and the
design dropped decision gateways as a result. The actual cause was the lowercase w. Gateways work
fine on both binaries with $WorkflowContext.
Environment
- mxcli
v0.16.0 (2026-07-12T11:44:17Z)
- Mendix Studio Pro 11.13.0 Beta; gated with that bundle's own
mx
- macOS 15 (Darwin 25.5.0), Apple silicon
- Probe contained no
CALL MICROFLOW, deliberately — the companion CALL MICROFLOW defect
otherwise fires first and masks this one.
Repo:
mendixlabs/mxcliAffects:
v0.16.0(current Latest release) — and, per prior testing, still unfixed on RnD504aec67Mendix: 11.13.0
Severity: Medium — model is loadable but carries a hard CE error; the failure is easy to misattribute to DECISION support being broken.
Summary
The workflow context variable is
$WorkflowContext. In aCALL MICROFLOW … WITH (…)clause,1b390dcenormalizes the casing of the expression, so a lowercase$workflowContextis accepted.DECISION expressions get no such normalization — they are stored verbatim, and Mendix then
rejects the unknown variable with
CE0117.This matters because the bundled
write-workflowsskill documents the lowercase spelling in itsDECISION example, so following the shipped docs produces a CE error.
Reproduction
Two workflows, identical except for the casing of the context variable.
Both pass
mxcli check --referencesand bothexeccleanly. Thenmx check:mx check$workflowContext/IsExclusive— verbatim, not normalized[error] [CE0117] "Error(s) in expression." at Decision 'Decision'$WorkflowContext/IsExclusive0 errorsAttribution is clean: with both present the project reports exactly 1 error; dropping E alone
returns it to
0 errors.Expected
DECISIONexpressions should get the same context-variable case normalization thatCALL MICROFLOW … WITHalready received in1b390dce— ormxcli checkshould flag the unknownvariable before
exec.Documentation defect
write-workflows(bundled with v0.16.0) uses the lowercase form in the DECISION example:Worth fixing regardless of which way the code fix goes.
Note on a related, unverified case
Variant D in the companion report (
CALL MICROFLOW … WITH (TFCStub = '$workflowContext'), i.e.lowercase inside a
WITHclause on v0.16.0) stored the expression verbatim as$workflowContextand still passed
mx checkwith0 errors. Whether that binds correctly at runtime was nottested — on Mendix 11.12.1 this exact class of defect was historically silent at check time and
wrong at runtime. Correct casing is the safe recommendation everywhere until that is verified.
Why this was previously misdiagnosed
An earlier local bug entry recorded "DECISION with enum comparison is broken in workflows" and the
design dropped decision gateways as a result. The actual cause was the lowercase
w. Gateways workfine on both binaries with
$WorkflowContext.Environment
v0.16.0 (2026-07-12T11:44:17Z)mxCALL MICROFLOW, deliberately — the companionCALL MICROFLOWdefectotherwise fires first and masks this one.