flowable/flowable-engine · error · FlowableIllegalArgumentException
callbackType is null
Error message
callbackType is null
What it means
FlowableIllegalArgumentException thrown by CaseInstanceQueryImpl.caseInstanceCallbackType(String) when callbackType is null. The query API treats callback type as a required value when filtering; null is not a valid filter. Supply a non-null callback type string.
Solutions
- Pass a non-null callbackType string.
- Skip the filter call when the value is absent.
- Default to a known callback type constant if one applies.
- Verify where the value originates (config/DTO) and why it is null.
Example fix
// before
query.caseInstanceCallbackType(dto.getCallbackType()); // null
// after
if (dto.getCallbackType() != null) {
query.caseInstanceCallbackType(dto.getCallbackType());
} Defensive patterns
Strategy: validation
Validate before calling
if (callbackType != null) { query.caseInstanceCallbackType(callbackType); } Type guard
boolean hasText(String s) { return s != null && !s.trim().isEmpty(); } Try / catch
try { query.caseInstanceCallbackType(type); } catch (FlowableIllegalArgumentException e) { log.warn("callbackType filter rejected: {}", e.getMessage()); } Prevention
- Never pass nullable DTO fields directly into required filter setters.
- Wrap optional filters in if-present checks.
- Define constants for valid callback types.
When it happens
Trigger: Calling caseInstanceCallbackType(null) on a CaseInstanceQuery, directly or via an or() statement where a variable resolved to null.
Common situations: Mapping an optional DTO field straight into the query; null callback type in a case instance model; typos in getter chains returning null.
Related errors
- Business key is null
- Business status is null
- callbackIds is null or empty
- Case definition keys is null
- id is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/afc3efc394552a6c.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/runtime/CaseInstanceQueryImpl.java:661
}
@Override
public CaseInstanceQuery 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 CaseInstanceQuery caseInstanceCallbackType(String callbackType) {
if (callbackType == null) {
throw new FlowableIllegalArgumentException("callbackType is null");
}
if (inOrStatement) {
this.currentOrQueryObject.callbackType = callbackType;
} else {
this.callbackType = callbackType;
}
return this;
}
@Override
public CaseInstanceQuery parentCaseInstanceId(String parentCaseInstanceId) {
if (parentCaseInstanceId == null) {
throw new FlowableIllegalArgumentException("parentCaseInstanceId is null");
}
if (inOrStatement) {
this.currentOrQueryObject.parentCaseInstanceId = parentCaseInstanceId;
} else {
this.parentCaseInstanceId = parentCaseInstanceId;View on GitHub (pinned to d6d39ce1c6)