{"record":{"id":"2127f2586f326c58","repo":"flowable/flowable-engine","slug":"cannot-start-process-instance-process-definition","errorCode":null,"errorMessage":"Cannot start process instance. Process definition ${processDefinition.getName()} (id = ${processDefinition.getId()}) is suspended","messagePattern":"Cannot start process instance\\. Process definition (.+?) \\(id = (.+?)\\) is suspended","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/CallActivityBehavior.java","lineNumber":116,"sourceCode":"\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();\n        }\n\n        StartSubProcessInstanceBeforeContext instanceBeforeContext = new StartSubProcessInstanceBeforeContext(businessKey, null,\n                callActivity.getProcessInstanceName(), new HashMap<>(), new HashMap<>(), executionEntity, callActivity.getInParameters(),\n                callActivity.isInheritVariables(), initialFlowElement.getId(), initialFlowElement, subProcess, processDefinition);","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/CallActivityBehavior.java#L98-L134","documentation":"Before starting the sub process instance from a call activity, Flowable checks whether the resolved target process definition is suspended. If it is (suspension state set via the management API), starting is refused and this FlowableException is thrown. Suspension is an intentional administrative state, so the engine refuses to create new instances of it.","triggerScenarios":"A call activity executes while the called sub-process definition (or one of its instances) was suspended via managementService.activateProcessDefinitionById/...ByIds being absent — i.e. the definition is in suspended state and a new sub instance start is attempted.","commonSituations":"Administrator suspended the sub process for maintenance or a version freeze and forgot to reactivate; long-running parent process hits the call activity during the suspension window; migration scripts suspend old definitions still referenced by call activities.","solutions":["Reactivate the definition: managementService.activateProcessDefinitionById(processDefinitionId) (optionally with activateProcessInstances).","If a different version should be used, suspend only the old version and point the call activity (calledElement) at the active version key.","Schedule the suspension window so the parent process does not reach the call activity, or migrate in-flight instances away from it.","Check suspension state first: repositoryService.createProcessDefinitionQuery().processDefinitionId(id).singleResult().isSuspended()."],"exampleFix":"// before: call activity fails because target definition is suspended\n// after: reactivate before resuming the parent process\nmanagementService.activateProcessDefinitionById(\"subProcess:2:456\", true, null);","handlingStrategy":"validation","validationCode":"ProcessDefinition def = repositoryService.createProcessDefinitionQuery().processDefinitionKey(\"subProcess\").latestVersion().singleResult();\nif (def != null && def.isSuspended()) managementService.activateProcessDefinitionById(def.getId());","typeGuard":null,"tryCatchPattern":"try { parent.resume(); }\ncatch (FlowableException e) { if (e.getMessage().contains(\"is suspended\")) { managementService.activateProcessDefinitionById(defId); retryLater(); } else { throw e; } }","preventionTips":["Check isSuspended() before resuming processes that hit call activities.","Use suspend/activate windows that account for in-flight call activities.","Prefer suspending specific versions, not keys in active use.","Automate reactivation after maintenance windows."],"tags":["flowable","call-activity","suspended","process-definition"],"backgroundTag":"invalid-state-transition","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"}