{"record":{"id":"61c065ee7fa94dfd","repo":"flowable/flowable-engine","slug":"variable-restvariable-getname-has-unsupport","errorCode":null,"errorMessage":"Variable '${restVariable.getName()}' has unsupported type: '${restVariable.getType()}'.","messagePattern":"Variable '(.+?)' has unsupported type: '(.+?)'\\.","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/CmmnRestResponseFactory.java","lineNumber":371,"sourceCode":"        }\n\n        return restVar;\n    }\n\n    public Object getVariableValue(RestVariable restVariable) {\n        Object value = null;\n\n        if (restVariable.getType() != null) {\n            // Try locating a converter if the type has been specified\n            RestVariableConverter converter = null;\n            for (RestVariableConverter conv : variableConverters) {\n                if (conv.getRestTypeName().equals(restVariable.getType())) {\n                    converter = conv;\n                    break;\n                }\n            }\n            if (converter == null) {\n                throw new FlowableIllegalArgumentException(\"Variable '\" + restVariable.getName() + \"' has unsupported type: '\" + restVariable.getType() + \"'.\");\n            }\n            value = converter.getVariableValue(restVariable);\n\n        } else {\n            // Revert to type determined by REST-to-Java mapping when no\n            // explicit type has been provided\n            value = restVariable.getValue();\n        }\n        return value;\n    }\n\n    public Object getVariableValue(QueryVariable restVariable) {\n        Object value = null;\n\n        if (restVariable.getType() != null) {\n            // Try locating a converter if the type has been specified\n            RestVariableConverter converter = null;\n            for (RestVariableConverter conv : variableConverters) {","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/CmmnRestResponseFactory.java#L353-L389","documentation":"When converting an incoming REST variable to a Java value, getVariableValue matches restVariable.getType() against registered RestVariableConverter rest type names. If no converter's name equals the given type string, the type is unsupported and this FlowableIllegalArgumentException is thrown.","triggerScenarios":"POST/PUT of variables to CMMN REST endpoints with a \"type\" field not in the converter registry (e.g. \"int32\" instead of \"integer\", \"customType\"); case-sensitive type names like \"String\" instead of \"string\".","commonSituations":"Clients built for other REST APIs using their type vocabulary; hand-written JSON bodies with wrong type strings; deployments missing custom converters for domain types.","solutions":["Use one of the supported REST type names (string, integer, short, double, boolean, date, json, etc.) in the variable payload","Omit the \"type\" field so the engine infers the type from the value","Register a custom RestVariableConverter for the needed type in the rest configuration","Log the actual restVariable.getType() value and compare against converter.getRestTypeName() values"],"exampleFix":"// before\n{\"name\":\"count\",\"type\":\"int32\",\"value\":5}\n// after\n{\"name\":\"count\",\"type\":\"integer\",\"value\":5}","handlingStrategy":"validation","validationCode":"Set<String> allowed = Set.of(\"string\",\"integer\",\"short\",\"long\",\"double\",\"boolean\",\"date\",\"json\");\nif (variable.type != null && !allowed.contains(variable.type)) throw new IllegalArgumentException(\"unsupported type \" + variable.type);","typeGuard":null,"tryCatchPattern":"try {\n    Object value = restResponseFactory.getVariableValue(restVariable);\n} catch (FlowableIllegalArgumentException e) {\n    restVariable.setType(null); // let the engine infer type\n    value = restResponseFactory.getVariableValue(restVariable);\n}","preventionTips":["Use the documented REST type names exactly (lowercase)","Omit \"type\" to rely on value inference","Test variable payloads against the target Flowable version","Register converters for any custom types your clients send"],"tags":["rest","variables","type-mismatch","validation"],"backgroundTag":"type-mismatch","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}