flowable/flowable-engine · error · FlowableException
deployment '<deploymentId>' didn't put case definition '<cas
Error message
deployment '<deploymentId>' didn't put case definition '<caseDefinitionId>' in the cache
What it means
resolveCaseDefinition cannot find the definition in cache, reloads its deployment from the database and redeploys it to repopulate the cache. If after redeploying, the deployment still did not register the requested case definition in the cache, it throws FlowableException — an internal invariant violation indicating inconsistent deployment data (e.g. the case definition row points to a deployment whose resources no longer produce it).
Source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/deployer/CmmnDeploymentManager.java:118
}
caseDefinition = resolveCaseDefinition(caseDefinition).getCaseDefinition();
return caseDefinition;
}
public CaseDefinitionCacheEntry resolveCaseDefinition(CaseDefinition caseDefinition) {
String caseDefinitionId = caseDefinition.getId();
String deploymentId = caseDefinition.getDeploymentId();
CaseDefinitionCacheEntry cachedCaseDefinition = caseDefinitionCache.get(caseDefinitionId);
if (cachedCaseDefinition == null) {
CmmnDeploymentEntity deployment = deploymentEntityManager.findById(deploymentId);
deployment.setNew(false);
deploy(deployment, null);
cachedCaseDefinition = deployment.getCaseDefinitionCacheEntry(caseDefinitionId);
if (cachedCaseDefinition == null) {
throw new FlowableException("deployment '" + deploymentId + "' didn't put case definition '" + caseDefinitionId + "' in the cache");
}
}
return cachedCaseDefinition;
}
public void removeDeployment(String deploymentId) {
removeDeployment(deploymentId, true);
}
public void removeDeployment(String deploymentId, boolean cascade) {
CmmnDeploymentEntity deployment = deploymentEntityManager.findById(deploymentId);
if (deployment == null) {
throw new FlowableObjectNotFoundException("Could not find a deployment with id '" + deploymentId + "'.", CmmnDeploymentEntity.class);
}
List<EngineDeployer> engineUnDeployers = new ArrayList<>(deployers);
engineUnDeployers.sort(Comparator.comparingInt(EngineDeployer::getUndeployOrder));
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Check DB consistency: ensure the case definition's DEPLOYMENT_ID points to a deployment whose byte arrays for the resource still exist
- Re-run the Flowable schema tooling / restore a consistent database backup
- Redeploy the case model fresh and update references to the new definition id
Example fix
// before (DB rows manually copied without ACT_GE_BYTEARRAY content)
-- deployment exists but no .cmmn resource bytes -> cache repopulation fails
// after
repositoryService.createDeployment().addClasspathResource("credit.cmmn").deploy();
// and use the new definition id returned by the deployment Defensive patterns
Strategy: try-catch
Try / catch
try { def = resolveDefinition(id); } catch (FlowableException e) { if (e.getMessage().contains("didn't put case definition")) { triggerConsistencyAlarm(); } } Prevention
- Never hand-edit or partially prune ACT_CMMN_* / ACT_GE_BYTEARRAY tables
- Use supported Flowable schema upgrade tooling between versions
When it happens
Trigger: A case definition row in the DB whose parent deployment's resources are missing/corrupt (partially deleted database, manual row manipulation, restore from backup mismatch) so re-deployment parses nothing matching caseDefinitionId.
Common situations: Restored or manually pruned ACT_CMMN_* tables where FK relationships broke; upgrading Flowable versions against an old schema; deleting resources from ACT_GE_BYTEARRAY directly.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Error deserializing json info for process definition + proce
- deployment '" + deploymentId + "' didn't put process definit
- Could not find a resource with id '<resourceName>' in deploy
- <e.getMessage()>
- Could not find an app deployment with id '<deploymentId>
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/976b3e9764633318.
Report an issue: GitHub.