{"record":{"id":"486611cbc05ab708","repo":"flowable/flowable-engine","slug":"cannot-start-a-sub-process-instance-process-model","errorCode":null,"errorMessage":"Cannot start a sub process instance. Process model ${processDefinition.getName()} (id = ${processDefinition.getId()}) could not be found","messagePattern":"Cannot start a sub process instance\\. Process model (.+?) \\(id = (.+?)\\) could not be found","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"critical","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/CallActivityBehavior.java","lineNumber":106,"sourceCode":"        this.fallbackToDefaultTenant = callActivity.getFallbackToDefaultTenant();\n    }\n\n    @Override\n    public void execute(DelegateExecution execution) {\n\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());","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/CallActivityBehavior.java#L88-L124","documentation":"Flowable's CallActivityBehavior resolves the called sub-process definition and then fetches its BPMN model from the definition cache via ProcessDefinitionUtil.getProcess(). If the model is absent from the cache/repository while the ProcessDefinition metadata exists, the engine cannot start the sub process instance and throws this FlowableException. It usually indicates repository inconsistency between process definition metadata and its deployed resource.","triggerScenarios":"Executing a call activity whose resolved process definition id has no corresponding BPMN XML resource in the deployment cache — e.g. the definition metadata row exists (ACT_RE_PROCDEF) but the resource was deleted or the cache was evicted/never populated, or an externally supplied/incorrect processDefinitionId is used.","commonSituations":"Manually deleting deployment resources from ACT_GE_BYTEARRAY while leaving process definition rows; database restored/copied partially across environments; custom deployment code that creates definitions without resources; cache misconfiguration after hot-redeploy.","solutions":["Redeploy the sub-process BPMN model so the definition resource and cache are restored, then retry.","Check consistency between ACT_RE_PROCDEF and ACT_GE_BYTEARRAY; repair missing resource rows for the reported definition id.","Clear or restart the process engine to rebuild the definition cache from the repository.","Verify the call activity's calledElement resolves to the intended, actually deployed process definition id."],"exampleFix":"// before: resource manually deleted from DB, definition row left behind\nDELETE FROM ACT_RE_PROCDEF WHERE ID_ = 'subProcess:1:123';\n// after: redeploy the full model so metadata + resource stay consistent\nrepositoryService.createDeployment().addClasspathResource(\"processes/subProcess.bpmn20.xml\").deploy();","handlingStrategy":"try-catch","validationCode":"ProcessDefinition def = repositoryService.createProcessDefinitionQuery().processDefinitionId(id).singleResult();\nif (def == null) throw new IllegalStateException(\"Definition not deployed: \" + id);","typeGuard":null,"tryCatchPattern":"try { runtimeService.startProcessInstanceByKey(\"parent\"); }\ncatch (FlowableException e) { if (e.getMessage().contains(\"could not be found\")) { redeploySubProcessModel(); } else { throw e; } }","preventionTips":["Never delete deployment resources directly from the database.","Deploy parent and subprocess models together in one BAR when possible.","Validate deployments with the Flowable validator before deploy.","Monitor definition cache/repo consistency after migrations."],"tags":["flowable","call-activity","process-definition","cache"],"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"}