Summary
CREATE JAVA ACTION cannot create a parameter of an Enumeration type. Both the ENUM Module.Enum and the Enumeration(Module.Enum) syntaxes serialize the parameter as an Object / entity-reference parameter pointing at the enumeration's qualified name as if it were an entity. mxcli check and mxcli exec both succeed, but the resulting model is invalid: mxbuild (and Studio Pro) reject it because the referenced "entity" does not exist (the name is an enumeration, not an entity).
This forces a workaround of either adding the enum parameter manually in Studio Pro, or dropping the parameter and hard-coding the value in the Java body.
mxcli version
mxcli version v0.13.0 (2026-06-20T10:38:49Z)
Mendix version
10.24.21.108016
Steps to reproduce
Given any enumeration (here the marketplace Barcode.BarcodeFormat):
CREATE JAVA ACTION AssetManagement.GenerateBarcodeWithLogo(
"text": String NOT NULL,
"format": Enumeration(Barcode.BarcodeFormat) NOT NULL,
"width": Integer NOT NULL,
"height": Integer NOT NULL,
"destination": System.Image NOT NULL
)
AS $$
return true;
$$;
(The ENUM Barcode.BarcodeFormat syntax behaves identically.)
./mxcli check script.mdl -p App.mpr --references → passes
./mxcli exec script.mdl -p App.mpr → succeeds ("Created java action: ...")
- Build the project (
mxbuild --target=deploy App.mpr, or open in Studio Pro).
Expected behaviour
The format parameter is created as a Java action parameter of type Enumeration, value type Barcode.BarcodeFormat (the same shape Studio Pro produces, generating barcode.proxies.BarcodeFormat format in the action stub). The project builds.
Actual behaviour
The parameter is serialized as an entity/object parameter. The generated mxcli stub shows it as a raw IMendixObject, and the build fails with:
ERROR at AssetManagement, Java action 'GenerateBarcodeWithLogo',
Property 'Entity' of Java action parameter 'format':
The selected entity 'Barcode.BarcodeFormat' no longer exists.
So the parameter's Entity property was populated with an enumeration's qualified name. mxcli check/exec do not detect this — only the downstream build does.
Notes / related
Diagnostic bundle
Available: mxcli-diag-20260622-132344.tar.gz
Summary
CREATE JAVA ACTIONcannot create a parameter of an Enumeration type. Both theENUM Module.Enumand theEnumeration(Module.Enum)syntaxes serialize the parameter as an Object / entity-reference parameter pointing at the enumeration's qualified name as if it were an entity.mxcli checkandmxcli execboth succeed, but the resulting model is invalid:mxbuild(and Studio Pro) reject it because the referenced "entity" does not exist (the name is an enumeration, not an entity).This forces a workaround of either adding the enum parameter manually in Studio Pro, or dropping the parameter and hard-coding the value in the Java body.
mxcli version
Mendix version
10.24.21.108016Steps to reproduce
Given any enumeration (here the marketplace
Barcode.BarcodeFormat):(The
ENUM Barcode.BarcodeFormatsyntax behaves identically.)./mxcli check script.mdl -p App.mpr --references→ passes./mxcli exec script.mdl -p App.mpr→ succeeds ("Created java action: ...")mxbuild --target=deploy App.mpr, or open in Studio Pro).Expected behaviour
The
formatparameter is created as a Java action parameter of type Enumeration, value typeBarcode.BarcodeFormat(the same shape Studio Pro produces, generatingbarcode.proxies.BarcodeFormat formatin the action stub). The project builds.Actual behaviour
The parameter is serialized as an entity/object parameter. The generated mxcli stub shows it as a raw
IMendixObject, and the build fails with:So the parameter's
Entityproperty was populated with an enumeration's qualified name.mxcli check/execdo not detect this — only the downstream build does.Notes / related
mxcli checkcould validate that a Java-action parameter typed asEnumeration(...)/ENUM ...resolves to an actual enumeration and is written to the parameter's enumeration slot (not theEntityslot).Diagnostic bundle
Available:
mxcli-diag-20260622-132344.tar.gz