flowable/flowable-engine · error · FlowableIllegalArgumentException

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

Error message

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

What it means

The class-delegate HTTP handler configuration points to a class that exists and instantiates, but does not implement org.flowable.http.HttpRequestHandler. Flowable requires the configured delegate class to implement the expected handler interface.

Source

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

    @Override
    public void handleHttpRequest(VariableContainer execution, HttpRequest httpRequest, FlowableHttpClient client) {
        HttpRequestHandler httpRequestHandler = getHttpRequestHandlerInstance();
        httpRequestHandler.handleHttpRequest(execution, httpRequest, client);
    }

    @Override
    public void handleHttpResponse(VariableContainer execution, HttpResponse httpResponse) {
        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.HttpRequestHandler (handleHttpRequest method)
  2. Or configure a different class that already implements HttpRequestHandler
  3. If the delegate is meant for responses, configure it as the http response handler instead

Example fix

// before
public class MyHandler implements HttpResponseHandler { ... }
// after
public class MyHandler implements HttpRequestHandler {
    @Override
    public void handleHttpRequest(VariableContainer execution, HttpRequest request, FlowableHttpClient client) { ... }
}
Defensive patterns

Strategy: validation

Validate before calling

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

Type guard

function isRequestHandler(o) { return o != null && o.handleHttpRequest != null; }

Try / catch

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

Prevention

When it happens

Trigger: getHttpRequestHandlerInstance instantiates the configured className and the instanceof check fails when httpRequestHandler is accessed on the http activity.

Common situations: Configured a class implementing HttpResponseHandler only (or a random class) as an http request handler; wrong class in flowable:class attribute; refactoring moved interface implementations.

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/61ad58263f4170e4. Report an issue: GitHub.