{"record":{"id":"2e6ecc1d8cbc118a","repo":"flowable/flowable-engine","slug":"parentdeploymentid-is-null-2e6ecc","errorCode":null,"errorMessage":"parentDeploymentId is null","messagePattern":"parentDeploymentId is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DmnDeploymentQueryImpl.java","lineNumber":130,"sourceCode":"    @Override\n    public DmnDeploymentQueryImpl deploymentTenantIdLike(String tenantIdLike) {\n        if (tenantIdLike == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentTenantIdLike is null\");\n        }\n        this.tenantIdLike = tenantIdLike;\n        return this;\n    }\n\n    @Override\n    public DmnDeploymentQueryImpl deploymentWithoutTenantId() {\n        this.withoutTenantId = true;\n        return this;\n    }\n\n    @Override\n    public DmnDeploymentQueryImpl parentDeploymentId(String parentDeploymentId) {\n        if (parentDeploymentId == null) {\n            throw new FlowableIllegalArgumentException(\"parentDeploymentId is null\");\n        }\n        this.parentDeploymentId = parentDeploymentId;\n        return this;\n    }\n\n    @Override\n    public DmnDeploymentQueryImpl parentDeploymentIdLike(String parentDeploymentIdLike) {\n        if (parentDeploymentIdLike == null) {\n            throw new FlowableIllegalArgumentException(\"parentDeploymentIdLike is null\");\n        }\n        this.parentDeploymentIdLike = parentDeploymentIdLike;\n        return this;\n    }\n\n    @Override\n    public DmnDeploymentQueryImpl decisionKey(String key) {\n        if (key == null) {\n            throw new FlowableIllegalArgumentException(\"key is null\");","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/DmnDeploymentQueryImpl.java#L112-L148","documentation":"DmnDeploymentQueryImpl.parentDeploymentId(String) throws FlowableIllegalArgumentException when called with a null argument. The Flowable DMN query API validates every query criterion eagerly: a null filter value would silently produce a broken or unfiltered SQL query, so the engine rejects it immediately at the fluent-builder call site rather than at query execution.","triggerScenarios":"Calling dmnRepositoryService.createDeploymentQuery().parentDeploymentId(null), typically when the parent deployment id comes from an uninitialized variable, a missing map entry, or an optional configuration value that was never resolved.","commonSituations":"Building dynamic deployment queries where the parent deployment id is read from a properties file, database row, or request parameter that is absent; refactoring code that removed a default value; passing the result of an earlier query that returned no rows.","solutions":["Ensure parentDeploymentId is assigned a non-null deployment id string before invoking parentDeploymentId(...)","Skip the parentDeploymentId(...) call entirely when the value is null (the builder is fluent; omitting it yields an unfiltered-by-parent query)","Wrap the call in a null check or Objects.requireNonNull with a domain-specific message to fail earlier with better context"],"exampleFix":"// before\nString parentId = config.get(\"parentDeploymentId\");\nDmnDeploymentQuery q = repoService.createDeploymentQuery().parentDeploymentId(parentId);\n// after\nString parentId = config.get(\"parentDeploymentId\");\nDmnDeploymentQuery q = repoService.createDeploymentQuery();\nif (parentId != null) {\n    q = q.parentDeploymentId(parentId);\n}","handlingStrategy":"validation","validationCode":"if (parentDeploymentId == null) { throw new IllegalArgumentException(\"parentDeploymentId must be set before querying\"); }","typeGuard":"boolean hasParentDeploymentId(String id) { return id != null && !id.isEmpty(); }","tryCatchPattern":"try { query.parentDeploymentId(id); } catch (FlowableIllegalArgumentException e) { log.warn(\"Skipping parentDeploymentId filter: {}\", e.getMessage()); }","preventionTips":["Null-check ids obtained from config, maps, or lookups before applying query filters","Make filter application conditional: only chain criteria whose values are present","Prefer repository query APIs (singleResult by key) to obtain ids rather than storing them manually"],"tags":["flowable","dmn","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"}