{"record":{"id":"230f582c2860fd92","repo":"flowable/flowable-engine","slug":"executionid-is-null","errorCode":null,"errorMessage":"executionId is null","messagePattern":"executionId is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/HistoricDecisionExecutionQueryImpl.java","lineNumber":117,"sourceCode":"            throw new FlowableIllegalArgumentException(\"decisionKey is null\");\n        }\n        this.decisionKey = decisionKey;\n        return this;\n    }\n\n    @Override\n    public DmnHistoricDecisionExecutionQuery instanceId(String instanceId) {\n        if (instanceId == null) {\n            throw new FlowableIllegalArgumentException(\"instanceId is null\");\n        }\n        this.instanceId = instanceId;\n        return this;\n    }\n    \n    @Override\n    public DmnHistoricDecisionExecutionQuery executionId(String executionId) {\n        if (executionId == null) {\n            throw new FlowableIllegalArgumentException(\"executionId is null\");\n        }\n        this.executionId = executionId;\n        return this;\n    }\n    \n    @Override\n    public DmnHistoricDecisionExecutionQuery activityId(String activityId) {\n        if (activityId == null) {\n            throw new FlowableIllegalArgumentException(\"activityId is null\");\n        }\n        this.activityId = activityId;\n        return this;\n    }\n    \n    @Override\n    public DmnHistoricDecisionExecutionQuery scopeType(String scopeType) {\n        if (scopeType == null) {\n            throw new FlowableIllegalArgumentException(\"scopeType is null\");","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/HistoricDecisionExecutionQueryImpl.java#L99-L135","documentation":"HistoricDecisionExecutionQueryImpl.executionId(String) throws FlowableIllegalArgumentException when the executionId argument is null. The execution id links a historic decision execution to the process execution that triggered it; a null value is rejected in the builder to prevent malformed queries.","triggerScenarios":"Calling dmnHistoryService.createHistoricDecisionExecutionQuery().executionId(null), typically when the execution reference is unavailable (standalone decision evaluation) or read from a stale/completed execution object.","commonSituations":"Correlating decision history to process executions where the execution already terminated and its id was never stored; generic history-report code that always applies an executionId filter; unit tests invoking the DMN engine outside a process context.","solutions":["Capture the execution id while the execution is still active and pass that stored value","Skip the executionId(...) filter when the value is null and rely on other criteria (instanceId, decisionKey)","Null-check the execution lookup result before using its id"],"exampleFix":"// before\nquery.executionId(currentExecution.getId()); // currentExecution may be null\n// after\nif (currentExecution != null && currentExecution.getId() != null) {\n    query.executionId(currentExecution.getId());\n}","handlingStrategy":"validation","validationCode":"if (executionId == null) { throw new IllegalArgumentException(\"executionId must be captured while the execution is active\"); }","typeGuard":"boolean hasExecutionId(DelegateExecution ex) { return ex != null && ex.getId() != null; }","tryCatchPattern":"try { query.executionId(exId); } catch (FlowableIllegalArgumentException e) { log.warn(\"executionId filter omitted: {}\", e.getMessage()); }","preventionTips":["Store the execution id at decision-invocation time if you need to correlate history later","Avoid relying on execution references after the execution has completed"],"tags":["flowable","dmn","history","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-14T11:17:12.474Z"}