{"record":{"id":"0d4ddc81e8c77b29","repo":"flowable/flowable-engine","slug":"callback-id-is-null","errorCode":null,"errorMessage":"callback id is null","messagePattern":"callback id is null","errorType":"exception","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/history/HistoricCaseInstanceQueryImpl.java","lineNumber":731,"sourceCode":"\n    @Override\n    public HistoricCaseInstanceQuery lastReactivatedBy(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\n        return this;\n    }\n\n    @Override\n    public HistoricCaseInstanceQuery caseInstanceCallbackId(String callbackId) {\n        if (callbackId == null) {\n            throw new FlowableIllegalArgumentException(\"callback id 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 HistoricCaseInstanceQuery 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":713,"sourceCodeEnd":749,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/history/HistoricCaseInstanceQueryImpl.java#L713-L749","documentation":"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.","triggerScenarios":"Calling historicCaseInstanceQuery.caseInstanceCallbackId(null), usually when the callback id variable comes from an external system payload or config that was not set.","commonSituations":"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.","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."],"exampleFix":"// before\nquery.caseInstanceCallbackId(payload.getCallbackId()); // may be null\n\n// after\nif (payload.getCallbackId() != null) {\n    query.caseInstanceCallbackId(payload.getCallbackId());\n}","handlingStrategy":"validation","validationCode":"if (callbackId != null && !callbackId.isEmpty()) {\n    query.caseInstanceCallbackId(callbackId);\n}","typeGuard":"boolean hasCallbackId = c -> c != null && !c.trim().isEmpty();","tryCatchPattern":"try {\n    query.caseInstanceCallbackId(callbackId);\n} catch (FlowableIllegalArgumentException e) {\n    throw new IllegalArgumentException(\"Invalid callback id filter: \" + e.getMessage());\n}","preventionTips":["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."],"tags":["null-argument","query-builder","cmmn","callback"],"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"}