{"record":{"id":"91aa866091e2c7de","repo":"flowable/flowable-engine","slug":"no-start-element-found-with-id-starteventid-for","errorCode":null,"errorMessage":"No start element found with id ${startEventId} for process definition ${id}","messagePattern":"No start element found with id (.+?) for process definition (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/util/ProcessInstanceHelper.java","lineNumber":101,"sourceCode":"                    variables, transientVariables, businessKey, processDefinition.getTenantId(), processInstanceName);\n        }\n\n        // Do not start process a process instance if the process definition is suspended\n        if (ProcessDefinitionUtil.isProcessDefinitionSuspended(processDefinition.getId())) {\n            throw new FlowableException(\"Cannot start process instance. Process definition \" + processDefinition.getName() + \" (id = \" + processDefinition.getId() + \") is suspended\");\n        }\n\n        // Get model from cache\n        Process process = ProcessDefinitionUtil.getProcess(processDefinition.getId());\n        if (process == null) {\n            throw new FlowableException(\"Cannot start process instance. Process model \" + processDefinition.getName() + \" (id = \" + processDefinition.getId() + \") could not be found\");\n        }\n        \n        FlowElement initialFlowElement = null;\n        if (StringUtils.isNotEmpty(startEventId)) {\n            FlowElement startEventFlowElement = process.getFlowElement(startEventId);\n            if (startEventFlowElement == null) {\n                throw new FlowableException(\"No start element found with id \" + startEventId + \" for process definition \" + processDefinition.getId());\n            }\n            \n            if (!(startEventFlowElement instanceof StartEvent)) {\n                throw new FlowableException(\"Provide start event id is not a start event \" + startEventId + \" for process definition \" + processDefinition.getId());\n            }\n            \n            initialFlowElement = startEventFlowElement;\n            \n        } else {\n            initialFlowElement = process.getInitialFlowElement();\n        }\n        \n        if (initialFlowElement == null) {\n            throw new FlowableException(\"No start element found for process definition \" + processDefinition.getId());\n        }\n\n        return createAndStartProcessInstanceWithInitialFlowElement(processDefinition, businessKey, businessStatus, processInstanceName,\n                overrideDefinitionTenantId,","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/util/ProcessInstanceHelper.java#L83-L119","documentation":"Thrown when a caller explicitly requests a specific start event via startEventId, but process.getFlowElement(startEventId) finds no flow element with that id in the parsed BPMN model. Flowable only proceeds if the supplied id resolves to an existing flow element.","triggerScenarios":"RuntimeService.startProcessInstanceByKey/ById variants that accept a startEventId (e.g. startProcessInstanceById(definitionId, businessKey, startEventId, variables)) with an id that does not exist anywhere in the process model.","commonSituations":"Typo in the start event id; referencing the start event's name instead of its id; the BPMN file was edited/renamed and the caller still uses the old id; caller assumes the 'StartEvent_1' generated id of another process.","solutions":["Open the deployed BPMN XML and use the exact id attribute of the desired <startEvent> element.","Verify with RepositoryService/BpmnModel: repositoryService.getBpmnModel(definitionId).getMainProcess().getFlowElement(id) before starting.","Pass null/empty startEventId if you just want the default (initial) start event.","Redeploy a corrected BPMN model if the start event id is genuinely missing."],"exampleFix":"// before\nruntimeService.startProcessInstanceByKey(\"order\", \"start\", vars); // 'start' is the name, not id\n// after\n// <startEvent id=\"startEvent1\" name=\"start\" .../>\nruntimeService.startProcessInstanceByKey(\"order\", \"startEvent1\", vars);","handlingStrategy":"validation","validationCode":"BpmnModel model = repositoryService.getBpmnModel(definitionId);\nFlowElement el = model.getMainProcess().getFlowElement(startEventId);\nif (!(el instanceof StartEvent)) {\n    throw new IllegalArgumentException(startEventId + \" is not a start event id in definition \" + definitionId);\n}","typeGuard":"public static boolean isStartEvent(BpmnModel model, String id) {\n    return model != null && model.getMainProcess() != null\n        && model.getMainProcess().getFlowElement(id) instanceof org.flowable.bpmn.model.StartEvent;\n}","tryCatchPattern":"try {\n    runtimeService.startProcessInstanceById(defId, businessKey, startEventId, vars);\n} catch (FlowableException e) {\n    if (e.getMessage().startsWith(\"No start element found\")) {\n        throw new IllegalArgumentException(\"Unknown startEventId: \" + startEventId, e);\n    }\n    throw e;\n}","preventionTips":["Extract start event ids from the BpmnModel, never hardcode from memory","Keep start event ids stable across model versions","Pass null for the default start event when unsure","Validate ids at startup with a process-definition metadata check"],"tags":["bpmn","start-event","invalid-identifier","flowable"],"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-18T11:17:12.947Z"}