{"record":{"id":"fd99af0b0e6897f0","repo":"flowable/flowable-engine","slug":"variable-restvariable-getname-has-unsupport-fd99af","errorCode":null,"errorMessage":"Variable '${restVariable.getName()}' has unsupported type: '${restVariable.getType()}'.","messagePattern":"Variable '(.+?)' has unsupported type: '(.+?)'\\.","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-external-job-rest/src/main/java/org/flowable/external/job/rest/service/api/ExternalJobRestResponseFactory.java","lineNumber":169,"sourceCode":"        }\n\n        return restVariable;\n    }\n\n    public Object getVariableValue(EngineRestVariable restVariable) {\n        Object value;\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    protected RestUrlBuilder createUrlBuilder() {\n        return RestUrlBuilder.fromCurrentRequest();\n    }\n\n    protected void initializeVariableConverters() {\n        variableConverters.add(new StringRestVariableConverter());\n        variableConverters.add(new IntegerRestVariableConverter());","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-external-job-rest/src/main/java/org/flowable/external/job/rest/service/api/ExternalJobRestResponseFactory.java#L151-L187","documentation":"ExternalJobRestResponseFactory.getVariableValue() maps REST variable payloads to Java values via registered REST variable converters matched on restTypeName. When the payload declares an explicit type whose name matches no known converter, Flowable throws FlowableIllegalArgumentException listing the variable name and offending type. Only converter-supported REST type names (string, integer, boolean, etc.) are accepted when type is provided.","triggerScenarios":"Posting an external job variable payload with a \"type\" field that is misspelled or unsupported (e.g. \"long\" vs \"integer\", \"datetime\" vs \"date\", custom type names) to the external job REST API.","commonSituations":"Hand-written REST clients guessing type names; clients ported from another REST API with a different type vocabulary; API version drift where a type name was renamed or dropped.","solutions":["Correct the variable's \"type\" field to a supported REST type name (string, integer, short, long, double, boolean, date, json, etc.)","Omit the \"type\" field entirely so Flowable infers the Java type from the value instead of converter lookup","Check the Flowable version's supported RestResponseFactory variable converters for the exact accepted names"],"exampleFix":"// before\n{\"name\": \"count\", \"type\": \"int\", \"value\": 5}\n\n// after\n{\"name\": \"count\", \"type\": \"integer\", \"value\": 5}","handlingStrategy":"validation","validationCode":"Set<String> supported = Set.of(\"string\",\"integer\",\"short\",\"long\",\"double\",\"boolean\",\"date\",\"json\",\"array\");\nif (variable.getType() != null && !supported.contains(variable.getType())) {\n    throw new IllegalArgumentException(\"unsupported REST variable type: \" + variable.getType());\n}","typeGuard":"boolean supportedType(String t) { return t == null || Set.of(\"string\",\"integer\",\"short\",\"long\",\"double\",\"boolean\",\"date\",\"json\").contains(t); }","tryCatchPattern":"try {\n    Object value = factory.getVariableValue(restVariable);\n} catch (FlowableIllegalArgumentException e) {\n    log.error(\"Unsupported variable type for {}: {}\", restVariable.getName(), restVariable.getType());\n    throw e;\n}","preventionTips":["Validate REST variable type names against Flowable's supported converters before sending","Omit the type field to let Flowable infer the type","Keep REST clients aligned with the Flowable version's RestResponseFactory converter list"],"tags":["flowable","rest-api","variable-type","external-job"],"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-14T05:17:10.506Z"}