flowable/flowable-engine · error · FlowableIllegalArgumentException

${delegateInstance.getClass().getName()} doesn't implement $

Error message

${delegateInstance.getClass().getName()} doesn't implement ${HttpResponseHandler.class}

What it means

The class-delegate HTTP handler configuration points to a class that does not implement org.flowable.http.HttpResponseHandler. The instantiated object fails the instanceof check in getHttpResponseHandlerInstance.

Source

Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/behavior/impl/http/handler/ClassDelegateHttpHandler.java:73

        HttpResponseHandler httpResponseHandler = getHttpResponseHandlerInstance();
        httpResponseHandler.handleHttpResponse(execution, httpResponse);
    }

    protected HttpRequestHandler getHttpRequestHandlerInstance() {
        Object delegateInstance = instantiate(className);
        if (delegateInstance instanceof HttpRequestHandler) {
            return (HttpRequestHandler) delegateInstance;
        } else {
            throw new FlowableIllegalArgumentException(delegateInstance.getClass().getName() + " doesn't implement " + HttpRequestHandler.class);
        }
    }

    protected HttpResponseHandler getHttpResponseHandlerInstance() {
        Object delegateInstance = instantiate(className);
        if (delegateInstance instanceof HttpResponseHandler) {
            return (HttpResponseHandler) delegateInstance;
        } else {
            throw new FlowableIllegalArgumentException(delegateInstance.getClass().getName() + " doesn't implement " + HttpResponseHandler.class);
        }
    }

}

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Make the configured class implement org.flowable.http.HttpResponseHandler (handleHttpResponse method)
  2. Or configure a class that actually implements HttpResponseHandler
  3. If it is a request handler, move it to the http request handler configuration instead

Example fix

// before
public class MyHandler implements HttpRequestHandler { ... }
// after
public class MyHandler implements HttpResponseHandler {
    @Override
    public void handleHttpResponse(VariableContainer execution, HttpResponse response) { ... }
}
Defensive patterns

Strategy: validation

Validate before calling

Class<?> c = Class.forName(className);
if (!HttpResponseHandler.class.isAssignableFrom(c)) throw new Error(className + ' must implement HttpResponseHandler');

Type guard

function isResponseHandler(o) { return o != null && o.handleHttpResponse != null; }

Try / catch

try { getHandler(); } catch (FlowableIllegalArgumentException e) { if (e.getMessage().contains('doesn't implement')) reconfigureDelegate(); else throw e; }

Prevention

When it happens

Trigger: An http activity's response handling resolves ClassDelegateHttpHandler whose className instantiates to a non-HttpResponseHandler object.

Common situations: Same class configured for both request and response handling but only implementing HttpRequestHandler; copy-paste of handler config with wrong class.

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/65737c75208e20d6. Report an issue: GitHub.