{"record":{"id":"8b91d4510a8d47d9","repo":"flowable/flowable-engine","slug":"variable-name-has-unsupported-type-type","errorCode":null,"errorMessage":"Variable '${name}' has unsupported type: '${type}'.","messagePattern":"Variable '(.+?)' has unsupported type: '(.+?)'\\.","errorType":"http","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-dmn-rest/src/main/java/org/flowable/dmn/rest/service/api/DmnRestResponseFactory.java","lineNumber":241,"sourceCode":"        response.setUrl(urlBuilder.buildUrl(DmnRestUrls.URL_HISTORIC_DECISION_EXECUTION, execution.getId()));\n\n        return response;\n    }\n\n    public Object getVariableValue(EngineRestVariable 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 EngineRestVariable createRestVariable(String name, Object value, boolean includeBinaryValue) {\n        return createRestVariable(name, value, includeBinaryValue, createUrlBuilder());\n    }\n\n    public EngineRestVariable createRestVariable(String name, Object value, boolean includeBinaryValue, DmnRestUrlBuilder urlBuilder) {\n\n        RestVariableConverter converter = null;","sourceCodeStart":223,"sourceCodeEnd":259,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-rest/src/main/java/org/flowable/dmn/rest/service/api/DmnRestResponseFactory.java#L223-L259","documentation":"DmnRestResponseFactory.getVariableValue throws FlowableIllegalArgumentException when a REST variable specifies a 'type' that has no matching REST variable converter registered. The declared type is not one of the supported REST variable type names.","triggerScenarios":"POSTing a DMN rule execute request whose inputVariables contain a variable with a 'type' field not matching any converter's restTypeName (e.g. \"long\" instead of \"integer\", or a custom type).","commonSituations":"Typos in the type name; using engine type names not exposed via REST; older/newer API versions where supported type names differ; copying payloads between Flowable REST APIs with different type vocabularies.","solutions":["Use a supported REST type name (e.g. string, integer, double, boolean, date) or omit 'type' to let the REST-to-Java mapping infer it.","Check the registered VariableConverter list's getRestTypeName() values for the exact spelling.","Remove the explicit type field and rely on JSON-based inference when possible.","Catch FlowableIllegalArgumentException in the client and surface which variable/type was rejected."],"exampleFix":"// before\n{\"name\": \"amount\", \"value\": 5, \"type\": \"long\"}\n// after\n{\"name\": \"amount\", \"value\": 5, \"type\": \"integer\"}","handlingStrategy":"validation","validationCode":"Set<String> allowed = Set.of(\"string\", \"integer\", \"double\", \"boolean\", \"date\", \"long\");\nif (variable.getType() != null && !allowed.contains(variable.getType())) {\n    throw new IllegalArgumentException(\"Unsupported REST variable type: \" + variable.getType());\n}","typeGuard":null,"tryCatchPattern":"try {\n    response = restTemplate.postForObject(url, request, DmnRuleServiceResponse.class);\n} catch (HttpClientErrorException e) {\n    logger.error(\"Variable type rejected: {}\", e.getResponseBodyAsString());\n}","preventionTips":["Use documented REST type names only","Omit the 'type' field to let inference handle it","Keep client type vocabulary in sync with the Flowable REST version"],"tags":["rest","dmn","variable-type","validation"],"backgroundTag":"invalid-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"}