{"record":{"id":"fece5c7ddd846b59","repo":"flowable/flowable-engine","slug":"callbackid-is-null","errorCode":null,"errorMessage":"callbackId is null","messagePattern":"callbackId is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/runtime/CaseInstanceQueryImpl.java","lineNumber":635,"sourceCode":"    }\n\n    @Override\n    public CaseInstanceQuery caseInstanceLastReactivatedBy(String userId) {\n        if (userId == null) {\n            throw new FlowableIllegalArgumentException(\"user id is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.lastReactivatedBy = userId;\n        } else {\n            this.lastReactivatedBy = userId;\n        }\n        return this;\n    }\n\n    @Override\n    public CaseInstanceQuery caseInstanceCallbackId(String callbackId) {\n        if (callbackId == null) {\n            throw new FlowableIllegalArgumentException(\"callbackId is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.callbackId = callbackId;\n        } else {\n            this.callbackId = callbackId;\n        }\n        return this;\n    }\n\n    @Override\n    public CaseInstanceQuery caseInstanceCallbackIds(Set<String> callbackIds) {\n        if (callbackIds == null || callbackIds.isEmpty()) {\n            throw new FlowableIllegalArgumentException(\"callbackIds is null or empty\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.callbackIds = callbackIds;\n        } else {\n            this.callbackIds = callbackIds;","sourceCodeStart":617,"sourceCodeEnd":653,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/runtime/CaseInstanceQueryImpl.java#L617-L653","documentation":"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.","triggerScenarios":"Calling caseInstanceQuery.caseInstanceCallbackId(null) directly, or forwarding a callbackId read from a related entity/variable that was never set.","commonSituations":"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.","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"],"exampleFix":"// before\nquery.caseInstanceCallbackId(callbackId); // throws when callbackId == null\n// after\nif (callbackId != null) {\n    query.caseInstanceCallbackId(callbackId);\n}","handlingStrategy":"validation","validationCode":"if (callbackId != null && !callbackId.isBlank()) {\n    query.caseInstanceCallbackId(callbackId);\n}","typeGuard":"boolean hasCallbackId(CaseInstance c) { return c != null && c.getCallbackId() != null; }","tryCatchPattern":"try {\n    query.caseInstanceCallbackId(callbackId);\n} catch (FlowableIllegalArgumentException e) {\n    log.warn(\"No callback id filter applied: {}\", e.getMessage());\n    return Collections.emptyList();\n}","preventionTips":["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"],"tags":["flowable","cmmn","null-argument","query-builder"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}