flowable/flowable-engine · error · FlowableIllegalArgumentException
callbackId is null
Error message
callbackId is null
What it means
Flowable throws this FlowableIllegalArgumentException when CaseInstanceQueryImpl.caseInstanceCallbackId(String) is called with a null callbackId. The callback id links a case instance to a callback (e.g. from a process/task); null is not an acceptable filter, so the engine fails fast at query build time.
Solutions
- Pass the actual non-null callback id
- Return an empty result / skip the query when the callback id is unknown
- Check the source entity for a callback id before querying
Example fix
// before
query.caseInstanceCallbackId(callbackId); // throws when callbackId == null
// after
if (callbackId != null) {
query.caseInstanceCallbackId(callbackId);
} Defensive patterns
Strategy: validation
Validate before calling
if (callbackId != null && !callbackId.isBlank()) {
query.caseInstanceCallbackId(callbackId);
} Type guard
boolean hasCallbackId(CaseInstance c) { return c != null && c.getCallbackId() != null; } Try / catch
try {
query.caseInstanceCallbackId(callbackId);
} catch (FlowableIllegalArgumentException e) {
log.warn("No callback id filter applied: {}", e.getMessage());
return Collections.emptyList();
} Prevention
- Check the source entity/variable actually has a callback id before correlating
- Treat missing callback ids as 'no results' rather than an unfiltered query
- Validate incoming request payloads for the callbackId field
When it happens
Trigger: Calling caseInstanceQuery.caseInstanceCallbackId(null) directly, or forwarding a callbackId read from a related entity/variable that was never set.
Common situations: Correlation lookups between processes and case instances where the callback id variable is absent; passing a payload field that is optional in the incoming request; early-version data (pre-callback support) lacking the field.
Related errors
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/fece5c7ddd846b59.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/runtime/CaseInstanceQueryImpl.java:635
}
@Override
public CaseInstanceQuery caseInstanceLastReactivatedBy(String userId) {
if (userId == null) {
throw new FlowableIllegalArgumentException("user id is null");
}
if (inOrStatement) {
this.currentOrQueryObject.lastReactivatedBy = userId;
} else {
this.lastReactivatedBy = userId;
}
return this;
}
@Override
public CaseInstanceQuery caseInstanceCallbackId(String callbackId) {
if (callbackId == null) {
throw new FlowableIllegalArgumentException("callbackId is null");
}
if (inOrStatement) {
this.currentOrQueryObject.callbackId = callbackId;
} else {
this.callbackId = callbackId;
}
return this;
}
@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;View on GitHub (pinned to d6d39ce1c6)