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
- Make the configured class implement org.flowable.http.HttpResponseHandler (handleHttpResponse method)
- Or configure a class that actually implements HttpResponseHandler
- 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
- Verify handler interfaces when copy-pasting http task config
- Unit-test response handlers against a mock HttpResponse
- Use distinct bean/class names for request vs response handlers
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
- ${delegateInstance.getClass().getName()} doesn't implement $
- Delegate expression ${expression} did not resolve to an impl
- Delegate expression ${expression} did not resolve to an impl
- ${this.getClass()} error: element is not a CaseElement : ${b
- name expression does not resolve to a string:
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/65737c75208e20d6.
Report an issue: GitHub.