{"record":{"id":"085352f9ad54c5ed","repo":"flowable/flowable-engine","slug":"deployment-id-is-null","errorCode":null,"errorMessage":"Deployment id is null","messagePattern":"Deployment id is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDeploymentQueryImpl.java","lineNumber":60,"sourceCode":"    protected String tenantIdLike;\n    protected boolean withoutTenantId;\n    protected boolean latest;\n\n    public AppDeploymentQueryImpl() {\n    }\n\n    public AppDeploymentQueryImpl(CommandContext commandContext) {\n        super(commandContext);\n    }\n\n    public AppDeploymentQueryImpl(CommandExecutor commandExecutor) {\n        super(commandExecutor);\n    }\n\n    @Override\n    public AppDeploymentQueryImpl 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 AppDeploymentQueryImpl 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 AppDeploymentQueryImpl deploymentName(String deploymentName) {\n        if (deploymentName == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentName is null\");","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDeploymentQueryImpl.java#L42-L78","documentation":"AppDeploymentQueryImpl.deploymentId() throws FlowableIllegalArgumentException when the deploymentId argument is null. Query filters require an explicit value; a null filter is ambiguous so the fluent API rejects it eagerly.","triggerScenarios":"Calling appRepositoryService.createDeploymentQuery().deploymentId(null), typically with a variable that was not populated from a prior deployment result.","commonSituations":"Storing createDeployment().deploy() result in a field that stayed null, or passing an unset request parameter straight into the query.","solutions":["Check deploymentId != null before building the query.","Capture the Deployment returned by deploy() to obtain a reliable id.","Skip the filter call conditionally when the id is absent (e.g. omit deploymentId()).","Catch FlowableIllegalArgumentException at the API boundary and return a 400-style message."],"exampleFix":"// before\nAppDeploymentQuery q = createDeploymentQuery().deploymentId(id); // id may be null\n// after\nif (id == null) throw new IllegalArgumentException(\"deploymentId required\");\nAppDeploymentQuery q = createDeploymentQuery().deploymentId(id);","handlingStrategy":"validation","validationCode":"if (deploymentId == null) { throw new IllegalArgumentException(\"deploymentId is required\"); }","typeGuard":null,"tryCatchPattern":"try {\n    query.deploymentId(deploymentId);\n} catch (org.flowable.common.engine.api.FlowableIllegalArgumentException e) {\n    throw new javax.ws.rs.BadRequestException(\"deploymentId must not be null\", e);\n}","preventionTips":["Always capture the Deployment returned by deploy() for its id","Validate path/request parameters before querying","Make id fields @NotNull in your API DTOs"],"tags":["java","flowable","query","null-check"],"backgroundTag":"missing-required-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}