{"record":{"id":"b714ae30b2236986","repo":"flowable/flowable-engine","slug":"deployment-id-is-null-b714ae","errorCode":null,"errorMessage":"Deployment id is null","messagePattern":"Deployment id is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CmmnDeploymentQueryImpl.java","lineNumber":63,"sourceCode":"    protected String parentDeploymentIdLike;\n    protected List<String> parentDeploymentIds;\n    protected boolean latest;\n\n    public CmmnDeploymentQueryImpl() {\n    }\n\n    public CmmnDeploymentQueryImpl(CommandContext commandContext) {\n        super(commandContext);\n    }\n\n    public CmmnDeploymentQueryImpl(CommandExecutor commandExecutor) {\n        super(commandExecutor);\n    }\n\n    @Override\n    public CmmnDeploymentQueryImpl 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 CmmnDeploymentQueryImpl 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 CmmnDeploymentQueryImpl deploymentName(String deploymentName) {\n        if (deploymentName == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentName is null\");","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CmmnDeploymentQueryImpl.java#L45-L81","documentation":"FlowableIllegalArgumentException thrown by CmmnDeploymentQueryImpl.deploymentId when the deploymentId argument is null. The query API requires a concrete deployment id to filter CMMN deployments; null cannot be translated into a SQL filter. It is fail-fast argument validation on the query builder.","triggerScenarios":"Calling cmmnRepositoryService.createDeploymentQuery().deploymentId(null), often because the id came from a variable/request parameter/lookup that was null.","commonSituations":"Reading a deployment id from a request or configuration that was not set, chaining a query after a failed lookup returned null, wiring bugs passing uninitialized fields.","solutions":["Ensure a valid, non-null deployment id is available before querying","Look up the id via a deployment query or process variable first and check for null","Skip the deploymentId filter if filtering by id is optional in your logic"],"exampleFix":"// before\nCmmnDeployment d = repoService.createDeploymentQuery().deploymentId(request.getParameter(\"id\")).singleResult();\n// after\nString id = request.getParameter(\"id\");\nif (id != null) { CmmnDeployment d = repoService.createDeploymentQuery().deploymentId(id).singleResult(); }","handlingStrategy":"validation","validationCode":"Objects.requireNonNull(deploymentId, \"deploymentId required\");","typeGuard":"static boolean validDeploymentId(String id) { return id != null && !id.trim().isEmpty(); }","tryCatchPattern":"try {\n    query.deploymentId(deploymentId);\n} catch (FlowableIllegalArgumentException e) {\n    if (\"Deployment id is null\".equals(e.getMessage())) {\n        throw new IllegalArgumentException(\"A non-null deployment id is required\", e);\n    }\n    throw e;\n}","preventionTips":["Resolve ids through typed handles (CmmnDeployment objects) instead of raw nullable strings","Check that path variables/request params are present before querying","Guard optional filters: only call deploymentId() when the id exists","Add unit tests covering null-id query paths"],"tags":["null-check","query","argument-validation","cmmn"],"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"}