flowable/flowable-engine · error · FlowableIllegalArgumentException
callback id is null
Error message
callback id is null
What it means
HistoricCaseInstanceQueryImpl.caseInstanceCallbackId(String) filters case instances by their callback identifier. A null callbackId cannot form a valid query condition, so the engine throws FlowableIllegalArgumentException during query construction. Deliberate fail-fast validation in the public API.
Solutions
- Pass a valid non-null callback id string to caseInstanceCallbackId().
- If the callback id is optional, guard the call and only apply the filter when present.
- Validate the upstream payload/config so the callback id is never null by the time the query is built.
- Catch FlowableIllegalArgumentException for external input and return a validation error to the caller.
Example fix
// before
query.caseInstanceCallbackId(payload.getCallbackId()); // may be null
// after
if (payload.getCallbackId() != null) {
query.caseInstanceCallbackId(payload.getCallbackId());
} Defensive patterns
Strategy: validation
Validate before calling
if (callbackId != null && !callbackId.isEmpty()) {
query.caseInstanceCallbackId(callbackId);
} Type guard
boolean hasCallbackId = c -> c != null && !c.trim().isEmpty();
Try / catch
try {
query.caseInstanceCallbackId(callbackId);
} catch (FlowableIllegalArgumentException e) {
throw new IllegalArgumentException("Invalid callback id filter: " + e.getMessage());
} Prevention
- Validate inbound payloads/records for the callbackId field before building queries.
- Treat a missing callbackId as 'no filter' rather than calling the setter with null.
- Add schema validation for integration messages carrying callback ids.
- Cover null-callbackId flows in tests to catch regressions early.
When it happens
Trigger: Calling historicCaseInstanceQuery.caseInstanceCallbackId(null), usually when the callback id variable comes from an external system payload or config that was not set.
Common situations: Processing inbound integration messages where the callbackId field is missing; configuration migrations dropping the callback property; lookups by correlation id when the id was never registered.
Related errors
- callbackId is null
- case definition tenantId is null
- caseDefinition tenantId is null
- Parent id is null
- Provided sub scope id is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/0d4ddc81e8c77b29.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/history/HistoricCaseInstanceQueryImpl.java:731
@Override
public HistoricCaseInstanceQuery lastReactivatedBy(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 HistoricCaseInstanceQuery caseInstanceCallbackId(String callbackId) {
if (callbackId == null) {
throw new FlowableIllegalArgumentException("callback id is null");
}
if (inOrStatement) {
this.currentOrQueryObject.callbackId = callbackId;
} else {
this.callbackId = callbackId;
}
return this;
}
@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;View on GitHub (pinned to d6d39ce1c6)