{"record":{"id":"d0c3afc9c547d4db","repo":"flowable/flowable-engine","slug":"parentdeploymentid-is-null","errorCode":null,"errorMessage":"parentDeploymentId is null","messagePattern":"parentDeploymentId is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CaseDefinitionQueryImpl.java","lineNumber":170,"sourceCode":"        this.deploymentId = deploymentId;\n        return this;\n    }\n\n    @Override\n    public CaseDefinitionQueryImpl deploymentIds(Set<String> deploymentIds) {\n        if (deploymentIds == null) {\n            throw new FlowableIllegalArgumentException(\"ids are null\");\n        } else if (deploymentIds.isEmpty()) {\n            throw new FlowableIllegalArgumentException(\"ids is an empty collection\");\n        }\n        this.deploymentIds = deploymentIds;\n        return this;\n    }\n\n    @Override\n    public CaseDefinitionQuery 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 CaseDefinitionQueryImpl caseDefinitionKey(String key) {\n        if (key == null) {\n            throw new FlowableIllegalArgumentException(\"key is null\");\n        }\n        this.key = key;\n        return this;\n    }\n\n    @Override\n    public CaseDefinitionQueryImpl caseDefinitionKeyLike(String keyLike) {\n        if (keyLike == null) {\n            throw new FlowableIllegalArgumentException(\"keyLike is null\");","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CaseDefinitionQueryImpl.java#L152-L188","documentation":"FlowableIllegalArgumentException thrown by CaseDefinitionQueryImpl.parentDeploymentId(String) when the parent deployment id is null. Parent deployment is used to scope case definitions to the deployment they were derived from (e.g. in app/deployment hierarchies); a null value is not a valid scope and is rejected at query-build time.","triggerScenarios":"Calling caseDefinitionQuery.parentDeploymentId(null), typically when the parent deployment reference is missing from configuration or a lookup.","commonSituations":"Code paths using Flowable app-engine style deployments where the parent deployment id variable was never resolved (missing app deployment, failed install step).","solutions":["Pass a valid parent deployment id string.","Only call parentDeploymentId when the id is known and non-null.","Ensure the parent deployment exists and its id was correctly resolved before building the query."],"exampleFix":"// before\nquery.parentDeploymentId(parentId); // may be null\n\n// after\nif (parentId != null) {\n    query.parentDeploymentId(parentId);\n}","handlingStrategy":"validation","validationCode":"if (parentDeploymentId != null) {\n    query.parentDeploymentId(parentDeploymentId);\n}","typeGuard":"boolean hasParent = parentDeploymentId != null && !parentDeploymentId.isEmpty();","tryCatchPattern":"try {\n    query.parentDeploymentId(parentDeploymentId);\n} catch (FlowableIllegalArgumentException e) {\n    // parent id unresolved — log and query without the parent scope\n}","preventionTips":["Resolve the parent deployment (and fail loudly) before building dependent queries.","Check app-engine/installation steps when the parent deployment id is persistently null."],"tags":["flowable","cmmn","query","deployment","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"}