{"record":{"id":"960ee755dddc3e2b","repo":"flowable/flowable-engine","slug":"process-definition-engine-version-is-null","errorCode":null,"errorMessage":"Process definition engine version is null","messagePattern":"Process definition engine version is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/ExecutionQueryImpl.java","lineNumber":286,"sourceCode":"    }\n\n    @Override\n    public ExecutionQuery processDefinitionVersion(Integer processDefinitionVersion) {\n        if (processDefinitionVersion == null) {\n            throw new FlowableIllegalArgumentException(\"Process definition version is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.processDefinitionVersion = processDefinitionVersion;\n        } else {\n            this.processDefinitionVersion = processDefinitionVersion;\n        }\n        return this;\n    }\n\n    @Override\n    public ExecutionQuery processDefinitionEngineVersion(String processDefinitionEngineVersion) {\n        if (processDefinitionEngineVersion == null) {\n            throw new FlowableIllegalArgumentException(\"Process definition engine version is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.processDefinitionEngineVersion = processDefinitionEngineVersion;\n        } else {\n            this.processDefinitionEngineVersion = processDefinitionEngineVersion;\n        }\n        return this;\n    }\n\n    @Override\n    public ExecutionQueryImpl processInstanceId(String processInstanceId) {\n        if (processInstanceId == null) {\n            throw new FlowableIllegalArgumentException(\"Process instance id is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.processInstanceId = processInstanceId;\n        } else {\n            this.processInstanceId = processInstanceId;","sourceCodeStart":268,"sourceCodeEnd":304,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/ExecutionQueryImpl.java#L268-L304","documentation":"FlowableIllegalArgumentException thrown by ExecutionQueryImpl.processDefinitionEngineVersion when the argument is null. The engine version filter (e.g. the Flowable engine version a definition targets) must be a non-null string; null is rejected at query-build time. Pass a value or omit the filter.","triggerScenarios":"Calling executionQuery.processDefinitionEngineVersion(null), including when setting it on currentOrQueryObject inside an or-statement.","commonSituations":"Engine version read from configuration or a metadata table that is missing; upgrades/migrations where the engine-version field was not populated.","solutions":["Null-check and apply the filter only when the engine version is known.","Populate the engine-version value in your config or metadata source.","Use FlowableVersions.CURRENT_VERSION (or an explicit version constant) as a default.","Omit the filter if engine version should not constrain the query."],"exampleFix":"// before\nquery.processDefinitionEngineVersion(cfg.getEngineVersion());\n\n// after\nif (cfg.getEngineVersion() != null) {\n    query.processDefinitionEngineVersion(cfg.getEngineVersion());\n}","handlingStrategy":"validation","validationCode":"if (engineVersion != null) { query.processDefinitionEngineVersion(engineVersion); }","typeGuard":"boolean hasEngineVersion = engineVersion != null && !engineVersion.isEmpty();","tryCatchPattern":"try {\n    query.processDefinitionEngineVersion(engineVersion);\n} catch (FlowableIllegalArgumentException e) {\n    log.warn(\"Null engine version filter skipped\");\n}","preventionTips":["Default engine version to the current Flowable version constant when unknown.","Keep engine-version metadata populated in your deployment store.","Validate configuration before building queries that depend on it."],"tags":["flowable","query","null-argument","engine-version"],"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"}