{"record":{"id":"44d0a51d85ab096a","repo":"flowable/flowable-engine","slug":"callback-type-is-null","errorCode":null,"errorMessage":"callback type is null","messagePattern":"callback type 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":757,"sourceCode":"    }\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;\n        }\n        return this;\n    }\n    \n    @Override\n    public HistoricCaseInstanceQuery caseInstanceCallbackType(String callbackType) {\n        if (callbackType == null) {\n            throw new FlowableIllegalArgumentException(\"callback type is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.callbackType = callbackType;\n        } else {\n            this.callbackType = callbackType;\n        }\n        return this;\n    }\n    \n    @Override\n    public HistoricCaseInstanceQuery parentCaseInstanceId(String parentCaseInstanceId) {\n        if (parentCaseInstanceId == null) {\n            throw new FlowableIllegalArgumentException(\"parent case instance id is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.parentCaseInstanceId = parentCaseInstanceId;\n        } else {\n            this.parentCaseInstanceId = parentCaseInstanceId;","sourceCodeStart":739,"sourceCodeEnd":775,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/history/HistoricCaseInstanceQueryImpl.java#L739-L775","documentation":"HistoricCaseInstanceQueryImpl.caseInstanceCallbackType(String) rejects a null callbackType before assigning it to the query. Callback type is an equality filter column in the historic case instance table, and a null value is not a meaningful criterion, so Flowable throws FlowableIllegalArgumentException at query-construction time.","triggerScenarios":"Calling caseInstanceCallbackType(null) on a HistoricCaseInstanceQuery, either directly or within an or() statement, typically with a variable or config value that resolved to null.","commonSituations":"Reading the callback type from configuration/properties that omitted the key; passing a lookup result that came back null; copying query-builder code where the argument was computed rather than a literal.","solutions":["Pass a non-null callback type string (e.g. the type recorded when the case instance was correlated).","Omit the caseInstanceCallbackType filter entirely when no type is known.","Add a null check on the source value before building the query and log/skip the filter."],"exampleFix":"// before\nquery.caseInstanceCallbackType(callbackType);\n// after\nif (callbackType != null) {\n    query.caseInstanceCallbackType(callbackType);\n}","handlingStrategy":"validation","validationCode":"if (callbackType == null) {\n    throw new IllegalStateException(\"callbackType is required\");\n}\nquery.caseInstanceCallbackType(callbackType);","typeGuard":"boolean isSet(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try {\n    query.caseInstanceCallbackType(callbackType);\n} catch (FlowableIllegalArgumentException e) {\n    throw new IllegalArgumentException(\"Provide a non-null callbackType\", e);\n}","preventionTips":["Validate optional config/request values before using them as equality filters.","Prefer @NonNull annotations or Objects.requireNonNull at your API boundary.","Document that Flowable query filters never accept null as 'match anything'."],"tags":["null-argument","query","cmmn","validation"],"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"}