flowable/flowable-engine · error · FlowableIllegalArgumentException

Variable '${restVariable.getName()}' has unsupported type: '

Error message

Variable '${restVariable.getName()}' has unsupported type: '${restVariable.getType()}'.

What it means

When converting an incoming REST variable to a Java value, getVariableValue matches restVariable.getType() against registered RestVariableConverter rest type names. If no converter's name equals the given type string, the type is unsupported and this FlowableIllegalArgumentException is thrown.

Source

Thrown at modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/CmmnRestResponseFactory.java:371

        }

        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)

Solutions

  1. Use one of the supported REST type names (string, integer, short, double, boolean, date, json, etc.) in the variable payload
  2. Omit the "type" field so the engine infers the type from the value
  3. Register a custom RestVariableConverter for the needed type in the rest configuration
  4. Log the actual restVariable.getType() value and compare against converter.getRestTypeName() values

Example fix

// before
{"name":"count","type":"int32","value":5}
// after
{"name":"count","type":"integer","value":5}
Defensive patterns

Strategy: validation

Validate before calling

Set<String> allowed = Set.of("string","integer","short","long","double","boolean","date","json");
if (variable.type != null && !allowed.contains(variable.type)) throw new IllegalArgumentException("unsupported type " + variable.type);

Try / catch

try {
    Object value = restResponseFactory.getVariableValue(restVariable);
} catch (FlowableIllegalArgumentException e) {
    restVariable.setType(null); // let the engine infer type
    value = restResponseFactory.getVariableValue(restVariable);
}

Prevention

When it happens

Trigger: POST/PUT of variables to CMMN REST endpoints with a "type" field not in the converter registry (e.g. "int32" instead of "integer", "customType"); case-sensitive type names like "String" instead of "string".

Common situations: Clients built for other REST APIs using their type vocabulary; hand-written JSON bodies with wrong type strings; deployments missing custom converters for domain types.

Understand the failure class

Background: Type mismatch errors: IllegalArgumentException, TypeError and type guards across 150 open-source libraries — this error's family across 150 libraries.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/61c065ee7fa94dfd. Report an issue: GitHub.