flowable/flowable-engine · error · FlowableIllegalArgumentException
Variable '${restVariable.getName()}' has unsupported type: '
Error message
Variable '${restVariable.getName()}' has unsupported type: '${restVariable.getType()}'. What it means
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.
Source
Thrown at modules/flowable-external-job-rest/src/main/java/org/flowable/external/job/rest/service/api/ExternalJobRestResponseFactory.java:169
}
return restVariable;
}
public Object getVariableValue(EngineRestVariable restVariable) {
Object value;
if (restVariable.getType() != null) {
// Try locating a converter if the type has been specified
RestVariableConverter converter = null;
for (RestVariableConverter conv : variableConverters) {
if (conv.getRestTypeName().equals(restVariable.getType())) {
converter = conv;
break;
}
}
if (converter == null) {
throw new FlowableIllegalArgumentException("Variable '" + restVariable.getName() + "' has unsupported type: '" + restVariable.getType() + "'.");
}
value = converter.getVariableValue(restVariable);
} else {
// Revert to type determined by REST-to-Java mapping when no
// explicit type has been provided
value = restVariable.getValue();
}
return value;
}
protected RestUrlBuilder createUrlBuilder() {
return RestUrlBuilder.fromCurrentRequest();
}
protected void initializeVariableConverters() {
variableConverters.add(new StringRestVariableConverter());
variableConverters.add(new IntegerRestVariableConverter());View on GitHub (pinned to d6d39ce1c6)
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
Example fix
// before
{"name": "count", "type": "int", "value": 5}
// after
{"name": "count", "type": "integer", "value": 5} Defensive patterns
Strategy: validation
Validate before calling
Set<String> supported = Set.of("string","integer","short","long","double","boolean","date","json","array");
if (variable.getType() != null && !supported.contains(variable.getType())) {
throw new IllegalArgumentException("unsupported REST variable type: " + variable.getType());
} Type guard
boolean supportedType(String t) { return t == null || Set.of("string","integer","short","long","double","boolean","date","json").contains(t); } Try / catch
try {
Object value = factory.getVariableValue(restVariable);
} catch (FlowableIllegalArgumentException e) {
log.error("Unsupported variable type for {}: {}", restVariable.getName(), restVariable.getType());
throw e;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- The variable value does not have a type
- Could not find a case instance with id '${caseInstanceId}'.
- Historic task instance '' variable value for couldn't be fo
- Historic variable instance '' couldn't be found.
- Variable operation is missing for variable:
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/fd99af0b0e6897f0.
Report an issue: GitHub.