flowable/flowable-engine · error · FlowableObjectNotFoundException
no processes deployed with key = '" + processDefinitionKey…
Error message
no processes deployed with key = '" + processDefinitionKey + "' and version = '" + processDefinitionVersion + "'
What it means
Flowable throws FlowableObjectNotFoundException when looking up a deployed definition by exact key + version (optionally tenant) and no such combination exists. The query filters ACT_RE_PROCDEF on key, version and tenant; any mismatch produces null and this error.
Solutions
- Check available versions: repositoryService.createProcessDefinitionQuery().processDefinitionKey(key).list() and inspect getVersion()
- Use the latest version (startProcessInstanceByKey) instead of pinning an exact version if not strictly needed
- Redeploy the specific BPMN version if that exact version must exist
- Confirm tenant id matches the version's tenant scope
Example fix
// before
runtimeService.startProcessInstanceById(key, 7, vars); // version 7 never deployed
// after
ProcessDefinition pd = repositoryService.createProcessDefinitionQuery().processDefinitionKey(key)
.latestVersion().singleResult();
runtimeService.startProcessInstanceById(pd.getId(), vars); Defensive patterns
Strategy: validation
Validate before calling
ProcessDefinition pd = repositoryService.createProcessDefinitionQuery()
.processDefinitionKey(key)
.processDefinitionVersion(version)
.singleResult();
if (pd == null) { /* fall back to latestVersion */ } Prevention
- Avoid hardcoding version numbers; query latestVersion when possible
- After redeploys, re-resolve versions rather than caching them
- Include version in error logging for traceability
When it happens
Trigger: repositoryService.getProcessDefinition(key, version) style lookups / newProcessDefinition resolution where the requested version was never deployed or was deleted; asking for version 5 when only versions 1-3 exist.
Common situations: Hardcoded version numbers after redeployments shifted versions; definitions redeployed on a fresh database so old versions no longer exist; off-by-one assumptions (expecting version to start at 1 when it does, but requesting 0).
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- Cannot find process definition for id
- Cannot find process definition for key
- Cannot find process definition with id " +…
- Cannot find process definition with id
- Cannot find process definition with id
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/ddc546ff9138cd4d.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/persistence/deploy/DeploymentManager.java:108
}
processDefinition = resolveProcessDefinition(processDefinition).getProcessDefinition();
return processDefinition;
}
public ProcessDefinition findDeployedLatestProcessDefinitionByKeyAndTenantId(String processDefinitionKey, String tenantId) {
ProcessDefinition processDefinition = processDefinitionEntityManager.findLatestProcessDefinitionByKeyAndTenantId(processDefinitionKey, tenantId);
if (processDefinition == null) {
throw new FlowableObjectNotFoundException("no processes deployed with key '" + processDefinitionKey + "' for tenant identifier '" + tenantId + "'", ProcessDefinition.class);
}
processDefinition = resolveProcessDefinition(processDefinition).getProcessDefinition();
return processDefinition;
}
public ProcessDefinition findDeployedProcessDefinitionByKeyAndVersionAndTenantId(String processDefinitionKey, Integer processDefinitionVersion, String tenantId) {
ProcessDefinition processDefinition = (ProcessDefinitionEntity) processDefinitionEntityManager
.findProcessDefinitionByKeyAndVersionAndTenantId(processDefinitionKey, processDefinitionVersion, tenantId);
if (processDefinition == null) {
throw new FlowableObjectNotFoundException("no processes deployed with key = '" + processDefinitionKey + "' and version = '" + processDefinitionVersion + "'", ProcessDefinition.class);
}
processDefinition = resolveProcessDefinition(processDefinition).getProcessDefinition();
return processDefinition;
}
/**
* Resolving the process definition will fetch the BPMN 2.0, parse it and store the {@link BpmnModel} in memory.
*/
public ProcessDefinitionCacheEntry resolveProcessDefinition(ProcessDefinition processDefinition) {
String processDefinitionId = processDefinition.getId();
String deploymentId = processDefinition.getDeploymentId();
ProcessDefinitionCacheEntry cachedProcessDefinition = processDefinitionCache.get(processDefinitionId);
if (cachedProcessDefinition == null) {
if (Flowable5Util.isFlowable5ProcessDefinition(processDefinition, processEngineConfiguration)) {
return Flowable5Util.getFlowable5CompatibilityHandler().resolveProcessDefinition(processDefinition);
}View on GitHub (pinned to d6d39ce1c6)