{"record":{"id":"ddae2a4542a90d93","repo":"flowable/flowable-engine","slug":"no-process-definition-found-for-name","errorCode":null,"errorMessage":"No process definition found for name: ","messagePattern":"No process definition found for name: ","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cdi/src/main/java/org/flowable/cdi/BusinessProcess.java","lineNumber":233,"sourceCode":"        if (!processInstance.isEnded()) {\n            setExecution(processInstance);\n        }\n        return processInstance;\n    }\n\n    /**\n     * @deprecated\n     */\n    @Deprecated\n    public ProcessInstance startProcessByName(String string) {\n\n        if (Context.getCommandContext() != null) {\n            throw new FlowableCdiException(\"Cannot use startProcessByName in an active command.\");\n        }\n\n        ProcessDefinition definition = processEngine.getRepositoryService().createProcessDefinitionQuery().processDefinitionName(string).singleResult();\n        if (definition == null) {\n            throw new FlowableObjectNotFoundException(\"No process definition found for name: \" + string, ProcessDefinition.class);\n        }\n        ProcessInstance instance = processEngine.getRuntimeService().startProcessInstanceById(definition.getId(), getAndClearCachedVariables());\n        if (!instance.isEnded()) {\n            setExecution(instance);\n        }\n        return instance;\n    }\n\n    /**\n     * @deprecated\n     */\n    @Deprecated\n    public ProcessInstance startProcessByName(String string, Map<String, Object> variables) {\n\n        if (Context.getCommandContext() != null) {\n            throw new FlowableCdiException(\"Cannot use startProcessByName in an active command.\");\n        }\n","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cdi/src/main/java/org/flowable/cdi/BusinessProcess.java#L215-L251","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":"// before\nbusinessProcess.startProcessByName(\"OrderProcess\"); // wrong name\n// after\nProcessDefinition def = repositoryService.createProcessDefinitionQuery()\n    .processDefinitionName(\"Order Process\").latestVersion().singleResult();\nif (def != null) {\n  businessProcess.startProcessByName(\"Order Process\");\n}","handlingStrategy":"validation","validationCode":"ProcessDefinition def = repositoryService.createProcessDefinitionQuery()\n    .processDefinitionName(name).singleResult();\nif (def == null) throw new IllegalArgumentException(\"No deployed definition named \" + name);","typeGuard":"boolean isDeployed(String name) {\n  return repositoryService.createProcessDefinitionQuery()\n      .processDefinitionName(name).count() > 0;\n}","tryCatchPattern":"try {\n  businessProcess.startProcessByName(name);\n} catch (FlowableObjectNotFoundException e) {\n  // log missing definition, deploy or correct the name\n}","preventionTips":["Deploy BPMN resources in tests via @Deployment or createDeployment()","Distinguish process definition name from key","Query the repository to confirm exact names before starting"],"tags":["flowable","cdi","process-definition","not-found"],"backgroundTag":"resource-not-found","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"}