{"record":{"id":"f7a721ecbbd45775","repo":"flowable/flowable-engine","slug":"provided-execution-id-is-null-f7a721","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/DeadLetterJobQueryImpl.java","lineNumber":380,"sourceCode":"    }\n\n    @Override\n    public DeadLetterJobQuery 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 DeadLetterJobQueryImpl 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 DeadLetterJobQueryImpl 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":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/DeadLetterJobQueryImpl.java#L362-L398","documentation":"DeadLetterJobQueryImpl.executionId() throws FlowableIllegalArgumentException when the executionId parameter is null. The execution id scopes dead-letter jobs to a BPMN process execution; null is not a valid filter value, so Flowable rejects it during query construction. This mirrors the null checks on all other id-based filters in the query impl.","triggerScenarios":"Calling deadLetterJobQuery().executionId(null) with an execution id resolved from a process instance, job entity, or variable that was null, including within or() blocks.","commonSituations":"Process instance already ended and purged so its execution id no longer resolves; job entity with null executionId (e.g. process-level vs case-level jobs); copying ids between environments where the id does not exist.","solutions":["Null-check the execution id before calling executionId and skip the filter if optional.","Verify the execution exists: runtimeService.createExecutionQuery().executionId(id).singleResult().","For jobs not tied to an execution, filter by processInstanceId or handlerType instead."],"exampleFix":"// before\nquery.executionId(job.getExecutionId());\n// after\nif (job.getExecutionId() != null) {\n    query.executionId(job.getExecutionId());\n}","handlingStrategy":"validation","validationCode":"if (executionId == null) { return Collections.emptyList(); }\nreturn managementService.createDeadLetterJobQuery().executionId(executionId).list();","typeGuard":"boolean hasExecutionId(String id) { return id != null && id.startsWith(\"execution\"); }","tryCatchPattern":"try { query.executionId(execId); } catch (FlowableIllegalArgumentException e) { log.warn(\"Null execution id supplied to dead-letter job query\"); }","preventionTips":["Null-check job.getExecutionId() — it is null for non-BPMN jobs","Verify the execution still exists before filtering by it","Use processInstanceId for process-level queries when the execution id is absent"],"tags":["flowable","bpmn","query","null-check"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}