{"record":{"id":"08453c3c15c8b15b","repo":"flowable/flowable-engine","slug":"no-deployment-found-for-id-id","errorCode":null,"errorMessage":"No deployment found for id = '<id>'","messagePattern":"No deployment found for id = '<id>'","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/SetDeploymentCategoryCmd.java","lineNumber":45,"sourceCode":"    protected String deploymentId;\r\n    protected String category;\r\n\r\n    public SetDeploymentCategoryCmd(String deploymentId, String category) {\r\n        this.deploymentId = deploymentId;\r\n        this.category = category;\r\n    }\r\n\r\n    @Override\r\n    public Void execute(CommandContext commandContext) {\r\n\r\n        if (deploymentId == null) {\r\n            throw new FlowableIllegalArgumentException(\"Deployment id is null\");\r\n        }\r\n\r\n        DmnDeploymentEntity deployment = CommandContextUtil.getDeploymentEntityManager(commandContext).findById(deploymentId);\r\n\r\n        if (deployment == null) {\r\n            throw new FlowableObjectNotFoundException(\"No deployment found for id = '\" + deploymentId + \"'\");\r\n        }\r\n\r\n        // Update category\r\n        deployment.setCategory(category);\r\n        CommandContextUtil.getDeploymentEntityManager(commandContext).update(deployment);\r\n\r\n        return null;\r\n    }\r\n\r\n    public String getDeploymentId() {\r\n        return deploymentId;\r\n    }\r\n\r\n    public void setDeploymentId(String deploymentId) {\r\n        this.deploymentId = deploymentId;\r\n    }\r\n\r\n    public String getCategory() {\r","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/SetDeploymentCategoryCmd.java#L27-L63","documentation":"SetDeploymentCategoryCmd looks up the deployment via DeploymentEntityManager.findById after the null check. When no deployment matches the supplied id it throws FlowableObjectNotFoundException 'No deployment found for id = <id>'.","triggerScenarios":"Calling dmnRepositoryService.setDeploymentCategory(id, category) with a non-null id that does not exist in the DMN engine's ACT_DMN_DEPLOYMENT table.","commonSituations":"Wrong database/schema or datasource, deployment deleted earlier, id copied from the process (BPMN) engine instead of the DMN engine, or a typo in a configured deployment id.","solutions":["Check existence first: dmnRepositoryService.createDeploymentQuery().deploymentId(id).singleResult()","Point the DMN engine at the same database the deployment was made against","Re-deploy or use a valid deployment id; do not reuse BPMN engine deployment ids"],"exampleFix":"// before\nrepositoryService.setDeploymentCategory(id, \"cat\");\n// after\nDmnDeployment dep = repositoryService.createDeploymentQuery().deploymentId(id).singleResult();\nif (dep == null) throw new IllegalStateException(\"Unknown deployment: \" + id);\nrepositoryService.setDeploymentCategory(id, \"cat\");","handlingStrategy":"validation","validationCode":"DmnDeployment dep = repositoryService.createDeploymentQuery().deploymentId(id).singleResult();\nif (dep == null) throw new IllegalStateException(\"Deployment not found: \" + id);","typeGuard":null,"tryCatchPattern":"try {\n    repositoryService.setDeploymentCategory(id, category);\n} catch (FlowableObjectNotFoundException e) {\n    log.error(\"Deployment missing: {}\", id, e);\n    throw new IllegalStateException(\"Unknown deployment id\", e);\n}","preventionTips":["Verify the deployment exists in the same engine/database before updates","Never reuse BPMN engine deployment ids for DMN APIs","Handle cleanup flows where deployments may already be deleted"],"tags":["java","flowable-dmn","not-found"],"backgroundTag":"entity-not-found","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"}