{"record":{"id":"b2701f1a7b399cb5","repo":"flowable/flowable-engine","slug":"deployment-id-is-null-b2701f","errorCode":null,"errorMessage":"Deployment id is null","messagePattern":"Deployment id is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/DeploymentQueryImpl.java","lineNumber":69,"sourceCode":"    protected String processDefinitionKey;\n    protected String processDefinitionKeyLike;\n    protected boolean latest;\n\n    public DeploymentQueryImpl() {\n    }\n\n    public DeploymentQueryImpl(CommandContext commandContext) {\n        super(commandContext);\n    }\n\n    public DeploymentQueryImpl(CommandExecutor commandExecutor) {\n        super(commandExecutor);\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentId(String deploymentId) {\n        if (deploymentId == null) {\n            throw new FlowableIllegalArgumentException(\"Deployment id is null\");\n        }\n        this.deploymentId = deploymentId;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentIds(List<String> deploymentIds) {\n        if (deploymentIds == null) {\n            throw new FlowableIllegalArgumentException(\"Deployment ids is null\");\n        }\n        this.deploymentIds = deploymentIds;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentName(String deploymentName) {\n        if (deploymentName == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentName is null\");","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/DeploymentQueryImpl.java#L51-L87","documentation":"DeploymentQueryImpl.deploymentId(String) throws FlowableIllegalArgumentException when the deploymentId argument is null. Flowable validates query filter arguments at builder-call time, so a null id never reaches the database. A deployment id filter must be an actual identifier string.","triggerScenarios":"repositoryService.createDeploymentQuery().deploymentId(null), usually when the id is read from a variable, request parameter, or an empty lookup result.","commonSituations":"REST/admin endpoints where the deployment id query parameter is missing; code that stored a deployment id from a previous step that returned null.","solutions":["Pass a valid non-null deployment id obtained from RepositoryService.createDeploymentQuery().list() or the deploy() result.","Guard the call: if (deploymentId != null) query.deploymentId(deploymentId).","For 'not deployed yet' cases, handle the missing id before building the query."],"exampleFix":"// before\nDeployment d = repoService.createDeploymentQuery().deploymentId(id).singleResult();\n// after\nif (id == null) throw new IllegalArgumentException(\"deployment id required\");\nDeployment d = repoService.createDeploymentQuery().deploymentId(id).singleResult();","handlingStrategy":"validation","validationCode":"if (deploymentId == null || deploymentId.isEmpty()) {\n    throw new IllegalArgumentException(\"A non-empty deployment id is required\");\n}","typeGuard":"boolean isValidDeploymentId(String id) { return id != null && !id.trim().isEmpty(); }","tryCatchPattern":"try {\n    Deployment d = repoService.createDeploymentQuery().deploymentId(deploymentId).singleResult();\n} catch (FlowableIllegalArgumentException e) {\n    log.warn(\"Null deployment id supplied\", e);\n}","preventionTips":["Obtain deployment ids from the deploy() result or a prior query, never from unvalidated input","Validate request parameters for null/empty before building queries","Use a query-builder wrapper that skips null filters"],"tags":["flowable","query-builder","null-argument","deployment"],"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"}