flowable/flowable-engine · error · ActivitiObjectNotFoundException
no processes deployed with key '<processDefinitionKey>' for
Error message
no processes deployed with key '<processDefinitionKey>' for tenant identifier '<tenantId>'
What it means
Tenant-aware variant of the 'no processes deployed with key' error: findDeployedLatestProcessDefinitionByKeyAndTenantId throws ActivitiObjectNotFoundException when no process definition with the given key exists for the specified tenant. The definition may be deployed but under a different tenantId (or the global 'no tenant' scope), so the tenant-filtered query returns null.
Source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/persistence/deploy/DeploymentManager.java:162
ProcessDefinition processDefinition = Context
.getCommandContext()
.getProcessDefinitionEntityManager()
.findLatestProcessDefinitionByKey(processDefinitionKey);
if (processDefinition == null) {
throw new ActivitiObjectNotFoundException("no processes deployed with key '" + processDefinitionKey + "'", ProcessDefinition.class);
}
processDefinition = resolveProcessDefinition(processDefinition).getProcessDefinition();
return processDefinition;
}
public ProcessDefinition findDeployedLatestProcessDefinitionByKeyAndTenantId(String processDefinitionKey, String tenantId) {
ProcessDefinition processDefinition = Context
.getCommandContext()
.getProcessDefinitionEntityManager()
.findLatestProcessDefinitionByKeyAndTenantId(processDefinitionKey, tenantId);
if (processDefinition == null) {
throw new ActivitiObjectNotFoundException("no processes deployed with key '" + processDefinitionKey + "' for tenant identifier '" + tenantId + "'", ProcessDefinition.class);
}
processDefinition = resolveProcessDefinition(processDefinition).getProcessDefinition();
return processDefinition;
}
public ProcessDefinition findDeployedProcessDefinitionByKeyAndVersion(String processDefinitionKey, Integer processDefinitionVersion) {
ProcessDefinition processDefinition = (ProcessDefinitionEntity) Context
.getCommandContext()
.getProcessDefinitionEntityManager()
.findProcessDefinitionByKeyAndVersion(processDefinitionKey, processDefinitionVersion);
if (processDefinition == null) {
throw new ActivitiObjectNotFoundException("no processes deployed with key = '" + processDefinitionKey + "' and version = '" + processDefinitionVersion + "'", ProcessDefinition.class);
}
processDefinition = resolveProcessDefinition(processDefinition).getProcessDefinition();
return processDefinition;
}
public ProcessDefinitionCacheEntry resolveProcessDefinition(ProcessDefinition processDefinition) {View on GitHub (pinned to d6d39ce1c6)
Solutions
- Deploy the process with the same tenantId: deploymentBuilder.tenantId(tenantId)
- Verify with repositoryService.createProcessDefinitionQuery().processDefinitionKey(key).processDefinitionTenantId(tenantId).count()
- If the process is deployed without a tenant, start it without tenantId or redeploy it with the tenant
- Normalize tenantId strings (trim/case) to match what was used at deployment time
Example fix
// before
runtimeService.startProcessInstanceByKeyAndTenantId("OrderProcess", "acme"); // deployed as 'ACME'
// after
repositoryService.createDeployment().addClasspathResource("order.bpmn20.xml").tenantId("acme").deploy();
runtimeService.startProcessInstanceByKeyAndTenantId("OrderProcess", "acme"); Defensive patterns
Strategy: validation
Validate before calling
if (repositoryService.createProcessDefinitionQuery()
.processDefinitionKey(key)
.processDefinitionTenantId(tenantId).count() == 0) {
throw new IllegalStateException("No process " + key + " for tenant " + tenantId);
} Try / catch
try {
return runtimeService.startProcessInstanceByKeyAndTenantId(key, tenantId);
} catch (ActivitiObjectNotFoundException e) {
// fall back to tenant-less start or surface tenant misconfiguration
} Prevention
- Centralize tenantId constants; trim/case-normalize before use
- Deploy with tenantId(...) whenever multi-tenancy is on
- Audit tenant coverage of all process keys per environment
When it happens
Trigger: Calling RuntimeService.startProcessInstanceByKeyAndTenantId(key, tenantId) or RepositoryService query with processDefinitionKeyAndTenantId when the key is deployed only for another tenant or without a tenant.
Common situations: Multi-tenant setups where the tenantId string doesn't match the tenant deployed with (case/whitespace mismatch), processes deployed tenant-lessly but started with a tenantId, or missing tenant configuration on the deployment.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- No deployed process definition found for key '{processDefini
- no processes deployed with key '" + processDefinitionKey + "
- no processes deployed with key '" + processDefinitionKey + "
- No process definition found for id '<processDefinitionId>'
- No process definition found for key '<processDefinitionKey>'
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/24637568878d3023.
Report an issue: GitHub.