{"record":{"id":"85864ebda21fd968","repo":"flowable/flowable-engine","slug":"deployment-deploymentid-didn-t-put-proce","errorCode":null,"errorMessage":"deployment '\" + deploymentId + \"' didn't put process definition '\" + processDefinitionId + \"' in the cache","messagePattern":"deployment '\" \\+ deploymentId \\+ \"' didn't put process definition '\" \\+ processDefinitionId \\+ \"' in the cache","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/persistence/deploy/DeploymentManager.java","lineNumber":134,"sourceCode":"     */\n    public ProcessDefinitionCacheEntry resolveProcessDefinition(ProcessDefinition processDefinition) {\n        String processDefinitionId = processDefinition.getId();\n        String deploymentId = processDefinition.getDeploymentId();\n\n        ProcessDefinitionCacheEntry cachedProcessDefinition = processDefinitionCache.get(processDefinitionId);\n\n        if (cachedProcessDefinition == null) {\n            if (Flowable5Util.isFlowable5ProcessDefinition(processDefinition, processEngineConfiguration)) {\n                return Flowable5Util.getFlowable5CompatibilityHandler().resolveProcessDefinition(processDefinition);\n            }\n\n            DeploymentEntity deployment = deploymentEntityManager.findById(deploymentId);\n            deployment.setNew(false);\n            deploy(deployment, null);\n            cachedProcessDefinition = deployment.getProcessDefinitionCacheEntry(processDefinitionId);\n\n            if (cachedProcessDefinition == null) {\n                throw new FlowableException(\"deployment '\" + deploymentId + \"' didn't put process definition '\" + processDefinitionId + \"' in the cache\");\n            }\n        }\n        return cachedProcessDefinition;\n    }\n\n    public Object getAppResourceObject(String deploymentId) {\n        Object appResourceObject = appResourceCache.get(deploymentId);\n\n        if (appResourceObject == null) {\n            boolean appResourcePresent = false;\n            List<String> deploymentResourceNames = getDeploymentEntityManager().getDeploymentResourceNames(deploymentId);\n            for (String deploymentResourceName : deploymentResourceNames) {\n                if (deploymentResourceName.endsWith(\".app\")) {\n                    appResourcePresent = true;\n                    break;\n                }\n            }\n","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/persistence/deploy/DeploymentManager.java#L116-L152","documentation":"Flowable throws a plain FlowableException when, after re-deploying an existing deployment to rebuild the process definition cache, the deployment did not register the requested process definition id in the cache. This is an internal consistency violation: it indicates the definition id is not part of the given deployment, or the deployer failed to parse/register its resources.","triggerScenarios":"resolveProcessDefinition on a definition whose DB row references a deploymentId whose resources no longer contain that definition (e.g. deployment metadata corrupted, cascade-deleted resources, or a parse error in the BPMN resource that silently skipped registration).","commonSituations":"Manually manipulated ACT_GE_BYTEARRAY / ACT_RE_DEPLOYMENT rows; engine upgraded across versions leaving stale cache entries; deployment resources deleted while definition rows remain; a broken BPMN XML that fails parsing during re-deploy.","solutions":["Check the deployment's resources: repositoryService.getDeploymentResourceNames(deploymentId) and confirm the BPMN file is present and valid","If resources are inconsistent, redeploy the process definition and start from the new definition id","Clear/restart the engine to reset a stale cache if an upgrade was involved","Restore database consistency from backup if rows were manipulated manually"],"exampleFix":"// before\nProcessDefinition pd = repositoryService.getProcessDefinition(badDefinitionId);\n// after\nProcessDefinition pd = repositoryService.createProcessDefinitionQuery().latestVersion()\n    .processDefinitionKey(key).singleResult();\nrepositoryService.createDeployment().addClasspathResource(\"processes/myProcess.bpmn20.xml\").deploy();","handlingStrategy":"fallback","validationCode":"if (repositoryService.getDeploymentResourceNames(deploymentId).isEmpty()) {\n    // redeploy resources before resolving definitions from this deployment\n    repositoryService.createDeployment().addClasspathResource(\"processes/myProcess.bpmn20.xml\").deploy();\n}","typeGuard":null,"tryCatchPattern":"try {\n    ProcessDefinition pd = repositoryService.getProcessDefinition(definitionId);\n} catch (FlowableException e) {\n    // redeploy resources and resolve by key/latest version instead\n}","preventionTips":["Do not manipulate engine tables (ACT_GE_BYTEARRAY, ACT_RE_DEPLOYMENT) manually","Restart engines cleanly after version upgrades","Keep BPMN resources valid XML; validate in CI"],"tags":["flowable","cache","internal","deployment"],"backgroundTag":"internal-invariant-violation","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"}