{"record":{"id":"50639043eaac030e","repo":"flowable/flowable-engine","slug":"no-start-element-found-for-process-definition-pr","errorCode":null,"errorMessage":"No start element found for process definition ${processDefinition.getId()}","messagePattern":"No start element found for process definition (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/CallActivityBehavior.java","lineNumber":111,"sourceCode":"\n        ExecutionEntity executionEntity = (ExecutionEntity) execution;\n        CallActivity callActivity = (CallActivity) executionEntity.getCurrentFlowElement();\n        \n        CommandContext commandContext = CommandContextUtil.getCommandContext();\n\n        ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);\n\n        ProcessDefinition processDefinition = getProcessDefinition(execution, callActivity, processEngineConfiguration);\n\n        // Get model from cache\n        Process subProcess = ProcessDefinitionUtil.getProcess(processDefinition.getId());\n        if (subProcess == null) {\n            throw new FlowableException(\"Cannot start a sub process instance. Process model \" + processDefinition.getName() + \" (id = \" + processDefinition.getId() + \") could not be found\");\n        }\n\n        FlowElement initialFlowElement = subProcess.getInitialFlowElement();\n        if (initialFlowElement == null) {\n            throw new FlowableException(\"No start element found for process definition \" + processDefinition.getId());\n        }\n\n        // Do not start 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        ExecutionEntityManager executionEntityManager = CommandContextUtil.getExecutionEntityManager(commandContext);\n        ExpressionManager expressionManager = processEngineConfiguration.getExpressionManager();\n\n        String businessKey = null;\n        if (!StringUtils.isEmpty(callActivity.getBusinessKey())) {\n            Expression expression = expressionManager.createExpression(callActivity.getBusinessKey());\n            businessKey = expression.getValue(execution).toString();\n\n        } else if (callActivity.isInheritBusinessKey()) {\n            ExecutionEntity processInstance = executionEntityManager.findById(execution.getProcessInstanceId());\n            businessKey = processInstance.getBusinessKey();","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/CallActivityBehavior.java#L93-L129","documentation":"After loading the sub-process model in CallActivityBehavior.execute, the engine asks the Process object for its initial flow element (the implicit or explicit start event). If the deployed BPMN XML has no start event at all, a call activity cannot know where to begin the sub process instance, so Flowable throws this FlowableException.","triggerScenarios":"Calling a sub process (via call activity calledElement) whose BPMN XML contains no start event — neither an implicit none start event nor any explicit startEvent element.","commonSituations":"Hand-written or generated BPMN XML missing the <startEvent> element; a model edited in an external tool that stripped the start event; copying a process fragment into a new file without a start event and deploying it.","solutions":["Add a start event (e.g. <startEvent id=\"start\"/>) to the sub-process BPMN XML and redeploy.","Open the process in the Flowable modeler and verify it has exactly one start event connected to the first flow node.","Validate the deployed model (flowable:validate) before deployment to catch start-event-less processes early.","Confirm the call activity's calledElement points to the intended process, not a broken fragment deployment."],"exampleFix":"// before: subProcess.bpmn20.xml has no start event\n<process id=\"subProcess\"><serviceTask id=\"task1\" .../></process>\n// after\n<process id=\"subProcess\"><startEvent id=\"start\"/><sequenceFlow sourceRef=\"start\" targetRef=\"task1\"/><serviceTask id=\"task1\" .../></process>","handlingStrategy":"validation","validationCode":"boolean hasStartEvent = repositoryService.createProcessDefinitionQuery().processDefinitionKey(\"subProcess\").latestVersion().singleResult() != null;\n// plus static check: parse BPMN XML and assert a <startEvent> element exists","typeGuard":null,"tryCatchPattern":"try { runtimeService.signal(executionId); }\ncatch (FlowableException e) { if (e.getMessage().startsWith(\"No start element found\")) { fixModelAndRedeploy(); } else { throw e; } }","preventionTips":["Always include a start event in every process model.","Run flowable:modeler validation or Schema validation on BPMN XML in CI.","Reject deployments of models without start events in your deploy pipeline.","Re-validate models after external-tool edits."],"tags":["flowable","call-activity","bpmn","missing-start-event"],"backgroundTag":"invalid-config-value","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}