flowable/flowable-engine · error · FlowableIllegalArgumentException

callback type is null

Error message

callback type is null

What it means

HistoricCaseInstanceQueryImpl.caseInstanceCallbackType(String) rejects a null callbackType before assigning it to the query. Callback type is an equality filter column in the historic case instance table, and a null value is not a meaningful criterion, so Flowable throws FlowableIllegalArgumentException at query-construction time.

Solutions

  1. Pass a non-null callback type string (e.g. the type recorded when the case instance was correlated).
  2. Omit the caseInstanceCallbackType filter entirely when no type is known.
  3. Add a null check on the source value before building the query and log/skip the filter.

Example fix

// before
query.caseInstanceCallbackType(callbackType);
// after
if (callbackType != null) {
    query.caseInstanceCallbackType(callbackType);
}
Defensive patterns

Strategy: validation

Validate before calling

if (callbackType == null) {
    throw new IllegalStateException("callbackType is required");
}
query.caseInstanceCallbackType(callbackType);

Type guard

boolean isSet(String s) { return s != null && !s.trim().isEmpty(); }

Try / catch

try {
    query.caseInstanceCallbackType(callbackType);
} catch (FlowableIllegalArgumentException e) {
    throw new IllegalArgumentException("Provide a non-null callbackType", e);
}

Prevention

When it happens

Trigger: Calling caseInstanceCallbackType(null) on a HistoricCaseInstanceQuery, either directly or within an or() statement, typically with a variable or config value that resolved to null.

Common situations: Reading the callback type from configuration/properties that omitted the key; passing a lookup result that came back null; copying query-builder code where the argument was computed rather than a literal.

Related errors


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

Appendix: source

Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/history/HistoricCaseInstanceQueryImpl.java:757

    }

    @Override
    public HistoricCaseInstanceQuery caseInstanceCallbackIds(Set<String> callbackIds) {
        if (callbackIds == null || callbackIds.isEmpty()) {
            throw new FlowableIllegalArgumentException("callbackIds is null or empty");
        }
        if (inOrStatement) {
            this.currentOrQueryObject.callbackIds = callbackIds;
        } else {
            this.callbackIds = callbackIds;
        }
        return this;
    }
    
    @Override
    public HistoricCaseInstanceQuery caseInstanceCallbackType(String callbackType) {
        if (callbackType == null) {
            throw new FlowableIllegalArgumentException("callback type is null");
        }
        if (inOrStatement) {
            this.currentOrQueryObject.callbackType = callbackType;
        } else {
            this.callbackType = callbackType;
        }
        return this;
    }
    
    @Override
    public HistoricCaseInstanceQuery parentCaseInstanceId(String parentCaseInstanceId) {
        if (parentCaseInstanceId == null) {
            throw new FlowableIllegalArgumentException("parent case instance id is null");
        }
        if (inOrStatement) {
            this.currentOrQueryObject.parentCaseInstanceId = parentCaseInstanceId;
        } else {
            this.parentCaseInstanceId = parentCaseInstanceId;

View on GitHub (pinned to d6d39ce1c6)