flowable/flowable-engine · error · FlowableIllegalArgumentException
Variable '" + restVariable.getName() + "' has unsupported…
Error message
Variable '" + restVariable.getName() + "' has unsupported type: '" + restVariable.getType() + "'.
What it means
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.
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().
Example fix
// before
{"name":"created","type":"datetime","value":"2026-01-01"}
// after
{"name":"created","type":"date","value":"2026-01-01T00:00:00Z"} Defensive patterns
Strategy: validation
Validate before calling
Set<String> supported = Set.of("string","integer","short","long","double","boolean","date","binary","serializable","json");
if (!supported.contains(variableJson.type)) { throw new IllegalArgumentException("Unsupported type " + variableJson.type); } Try / catch
try { value = factory.getVariableValue(restVariable); } catch (FlowableIllegalArgumentException e) { /* unsupported variable type */ } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Execution ' ' does not have a variable ' ' in scope
- Invalid variable scope: '" + scope + "'
- A group or a user is required to create an identity link.
- A group or a user is required to create an identity link.
- Authentication failed for this username and password
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/dc17767195e5d22e.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/RestResponseFactory.java:396
}
return restVar;
}
public Object getVariableValue(RestVariable restVariable) {
Object value = null;
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;
}
public Object getVariableValue(QueryVariable restVariable) {
Object value = null;
if (restVariable.getType() != null) {
// Try locating a converter if the type has been specified
RestVariableConverter converter = null;
for (RestVariableConverter conv : variableConverters) {View on GitHub (pinned to d6d39ce1c6)