{"record":{"id":"dc17767195e5d22e","repo":"flowable/flowable-engine","slug":"variable-restvariable-getname-has-unsu","errorCode":null,"errorMessage":"Variable '\" + restVariable.getName() + \"' has unsupported type: '\" + restVariable.getType() + \"'.","messagePattern":"Variable '\" \\+ restVariable\\.getName\\(\\) \\+ \"' has unsupported type: '\" \\+ restVariable\\.getType\\(\\) \\+ \"'\\.","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/RestResponseFactory.java","lineNumber":396,"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":378,"sourceCodeEnd":414,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/RestResponseFactory.java#L378-L414","documentation":"In RestResponseFactory.getVariableValue, when a RestVariable carries an explicit type, the factory looks up a matching RestVariableConverter by its REST type name. If no converter is registered for that type name, it throws FlowableIllegalArgumentException, since the REST type string cannot be mapped to a Java value.","triggerScenarios":"Passing a variable body with a \"type\" field (e.g. \"date\", \"json\", \"custom\") that none of the registered converters' getRestTypeName() equals — typically in PUT variable or start-process/complete-task requests via the REST API.","commonSituations":"Client sends a type name from a different API dialect or a custom variable type that was never registered; Flowable version differences where type names changed; typos like \"datetime\" vs \"date\" or casing mismatches.","solutions":["Use one of the supported REST type names registered in RestResponseFactory (string, integer, short, long, double, boolean, date, binary, serializable, json, etc.).","Omit the \"type\" field entirely and let the REST-to-Java mapping infer the type from the value.","Register a custom RestVariableConverter for your type in the REST configuration.","Correct the casing/spelling of the type field to match the converter's getRestTypeName()."],"exampleFix":"// before\n{\"name\":\"created\",\"type\":\"datetime\",\"value\":\"2026-01-01\"}\n// after\n{\"name\":\"created\",\"type\":\"date\",\"value\":\"2026-01-01T00:00:00Z\"}","handlingStrategy":"validation","validationCode":"Set<String> supported = Set.of(\"string\",\"integer\",\"short\",\"long\",\"double\",\"boolean\",\"date\",\"binary\",\"serializable\",\"json\");\nif (!supported.contains(variableJson.type)) { throw new IllegalArgumentException(\"Unsupported type \" + variableJson.type); }","typeGuard":null,"tryCatchPattern":"try { value = factory.getVariableValue(restVariable); } catch (FlowableIllegalArgumentException e) { /* unsupported variable type */ }","preventionTips":["Only send REST type names registered in RestResponseFactory","Omit the type field to let inference map the value","Register custom converters for custom variable types"],"tags":["flowable","rest","variables","unsupported-type"],"backgroundTag":"unsupported-enum-value","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}