flowable/flowable-engine · error · FlowableObjectNotFoundException
No process definition found for name:
Error message
No process definition found for name:
What it means
startProcessByName queries the repository for a process definition whose name equals the given string; when the query returns no row, it throws FlowableObjectNotFoundException. This means no deployed (and enabled) process definition matches that name.
Source
Thrown at modules/flowable-cdi/src/main/java/org/flowable/cdi/BusinessProcess.java:233
if (!processInstance.isEnded()) {
setExecution(processInstance);
}
return processInstance;
}
/**
* @deprecated
*/
@Deprecated
public ProcessInstance startProcessByName(String string) {
if (Context.getCommandContext() != null) {
throw new FlowableCdiException("Cannot use startProcessByName in an active command.");
}
ProcessDefinition definition = processEngine.getRepositoryService().createProcessDefinitionQuery().processDefinitionName(string).singleResult();
if (definition == null) {
throw new FlowableObjectNotFoundException("No process definition found for name: " + string, ProcessDefinition.class);
}
ProcessInstance instance = processEngine.getRuntimeService().startProcessInstanceById(definition.getId(), getAndClearCachedVariables());
if (!instance.isEnded()) {
setExecution(instance);
}
return instance;
}
/**
* @deprecated
*/
@Deprecated
public ProcessInstance startProcessByName(String string, Map<String, Object> variables) {
if (Context.getCommandContext() != null) {
throw new FlowableCdiException("Cannot use startProcessByName in an active command.");
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Verify the deployed definition name via repositoryService.createProcessDefinitionQuery().list() and use an exact existing name.
- Deploy the BPMN resource before calling startProcessByName (e.g. repositoryService.createDeployment().addClasspathResource(...).deploy()).
- If you meant the process key, use startProcessByKey instead of by-name lookup.
Example fix
// before
businessProcess.startProcessByName("OrderProcess"); // wrong name
// after
ProcessDefinition def = repositoryService.createProcessDefinitionQuery()
.processDefinitionName("Order Process").latestVersion().singleResult();
if (def != null) {
businessProcess.startProcessByName("Order Process");
} Defensive patterns
Strategy: validation
Validate before calling
ProcessDefinition def = repositoryService.createProcessDefinitionQuery()
.processDefinitionName(name).singleResult();
if (def == null) throw new IllegalArgumentException("No deployed definition named " + name); Type guard
boolean isDeployed(String name) {
return repositoryService.createProcessDefinitionQuery()
.processDefinitionName(name).count() > 0;
} Try / catch
try {
businessProcess.startProcessByName(name);
} catch (FlowableObjectNotFoundException e) {
// log missing definition, deploy or correct the name
} Prevention
- Deploy BPMN resources in tests via @Deployment or createDeployment()
- Distinguish process definition name from key
- Query the repository to confirm exact names before starting
When it happens
Trigger: Calling businessProcess.startProcessByName(name) where no deployed process definition has that exact definition name — either never deployed, not yet deployed, or name mismatch (name vs key confusion).
Common situations: Deploying a BPMN whose process name differs from its key; forgetting to deploy resources in tests; using the process key where the name is expected; querying before the deployment transaction commits.
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
- Cannot associate execution by id: no execution with id '
- Cannot resume task with id '
- Process definition ${processDefinitionKey} was not found in
- No process definition found for key '{processDefinitionKey}'
- No process definition found for key '{processDefinitionKey}'
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/ddae2a4542a90d93.
Report an issue: GitHub.