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

  1. Use one of the supported REST type names registered in RestResponseFactory (string, integer, short, long, double, boolean, date, binary, serializable, json, etc.).
  2. Omit the "type" field entirely and let the REST-to-Java mapping infer the type from the value.
  3. Register a custom RestVariableConverter for your type in the REST configuration.
  4. 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

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


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)