{"record":{"id":"643c8ab104632b65","repo":"flowable/flowable-engine","slug":"provided-execution-id-is-null-643c8a","errorCode":null,"errorMessage":"Provided execution id is null","messagePattern":"Provided execution id is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/TimerJobQueryImpl.java","lineNumber":379,"sourceCode":"    }\n\n    @Override\n    public TimerJobQueryImpl correlationId(String correlationId) {\n        if (correlationId == null) {\n            throw new FlowableIllegalArgumentException(\"Provided correlationId is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.correlationId = correlationId;\n        } else {\n            this.correlationId = correlationId;\n        }\n        return this;\n    }\n\n    @Override\n    public TimerJobQueryImpl executionId(String executionId) {\n        if (executionId == null) {\n            throw new FlowableIllegalArgumentException(\"Provided execution id is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.executionId = executionId;\n        } else {\n            this.executionId = executionId;\n        }\n        return this;\n    }\n\n    @Override\n    public TimerJobQueryImpl handlerType(String handlerType) {\n        if (handlerType == null) {\n            throw new FlowableIllegalArgumentException(\"Provided handlerType is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.handlerType = handlerType;\n        } else {\n            this.handlerType = handlerType;","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/TimerJobQueryImpl.java#L361-L397","documentation":"FlowableIllegalArgumentException thrown by TimerJobQueryImpl.executionId(String) when the caller passes a null execution id. The query API validates arguments eagerly so that a null filter never reaches the SQL layer, where it would silently change semantics or fail obscurely. Fix by passing a non-null execution id string.","triggerScenarios":"Calling timerJobQuery().executionId(null) directly, or passing a variable/field holding execution id that is null (e.g. a DelegateExecution id captured before assignment).","commonSituations":"Building dynamic queries in custom Java delegates where the execution id comes from an unset process variable; refactoring that renamed a variable leaving it null; Spring beans injecting values after query construction.","solutions":["Pass a valid non-null execution id string to executionId().","Guard the call: only invoke executionId() when the value is non-null.","Use executionIdLike(...) or a different filter if you intended a pattern match.","Verify the source object (e.g. execution.getId()) is not null before querying."],"exampleFix":"// before\ntimerJobQuery.executionId(myExecutionId);\n// after\nif (myExecutionId != null) {\n    timerJobQuery.executionId(myExecutionId);\n}","handlingStrategy":"type-guard","validationCode":"if (executionId == null || executionId.isEmpty()) throw new IllegalArgumentException(\"executionId required before querying timer jobs\");","typeGuard":"boolean hasExecutionId(String id) { return id != null && !id.isEmpty(); }","tryCatchPattern":"try { timerJobQuery.executionId(executionId); } catch (FlowableIllegalArgumentException e) { log.warn(\"Skipping executionId filter: {}\", e.getMessage()); }","preventionTips":["Null-check ids at the source (execution.getId()) before query building","Build query filters only from validated request parameters","Prefer Objects.requireNonNull with a clear message when the id is mandatory"],"tags":["flowable","query","null-argument","timer-job"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}