flowable/flowable-engine · error · FlowableException
Cannot complete process instance. Parent process instance ${
Error message
Cannot complete process instance. Parent process instance ${executionEntity} is suspended What it means
When the sub process instance started by a call activity finishes, CallActivityBehavior.completed resumes the parent execution — but only if the parent process instance and its process definition are not suspended. If either is suspended, control flow cannot continue and this FlowableException is thrown.
Source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/behavior/CallActivityBehavior.java:281
BiConsumer<String, Object> variableConsumer = (variableName, value) -> {
if (callActivity.isUseLocalScopeForOutParameters()) {
executionEntity.setVariableLocal(variableName, value);
} else {
executionEntity.setVariable(variableName, value);
}
};
IOParameterUtil.processOutParameters(outParameters, subProcessInstance, variableConsumer, variableConsumer, expressionManager);
}
}
@Override
public void completed(DelegateExecution execution) throws Exception {
// only control flow. no sub process instance data available
ExecutionEntity executionEntity = (ExecutionEntity) execution;
if (executionEntity.isSuspended() || ProcessDefinitionUtil.isProcessDefinitionSuspended(execution.getProcessDefinitionId())) {
throw new FlowableException("Cannot complete process instance. Parent process instance " + executionEntity + " is suspended");
}
leave(execution);
}
protected ProcessDefinition getProcessDefinitionById(DelegateExecution execution, ProcessEngineConfigurationImpl processEngineConfiguration) {
return CommandContextUtil.getProcessEngineConfiguration().getDeploymentManager()
.findDeployedProcessDefinitionById(getCalledElementValue(execution, processEngineConfiguration));
}
protected ProcessDefinition getProcessDefinitionByKey(DelegateExecution execution, boolean isSameDeployment, ProcessEngineConfigurationImpl processEngineConfiguration) {
String processDefinitionKey = getCalledElementValue(execution, processEngineConfiguration);
String tenantId = execution.getTenantId();
ProcessDefinitionEntityManager processDefinitionEntityManager = Context.getProcessEngineConfiguration().getProcessDefinitionEntityManager();
ProcessDefinitionEntity processDefinition;
if (isSameDeployment) {View on GitHub (pinned to d6d39ce1c6)
Solutions
- Reactivate the parent: managementService.activateProcessDefinitionById(parentDefinitionId, true, null) so suspended parent instances resume.
- Reactivate the specific suspended execution: managementService.activateProcessInstanceById(parentInstanceId).
- Avoid suspending definitions with live call-activity children; drain sub instances before suspending or use activateProcessInstances=true consistently.
- Monitor for stuck child instances before ending a maintenance window.
Example fix
// before: parent definition suspended while child still running
managementService.suspendProcessDefinitionById("parent:1:1", false, null);
// after: keep instances activatable or reactivate before children complete
managementService.activateProcessDefinitionById("parent:1:1", true, null); Defensive patterns
Strategy: try-catch
Validate before calling
if (managementService.createProcessInstanceQuery().processInstanceId(parentId).singleResult().isSuspended()) {
managementService.activateProcessInstanceById(parentId);
} Try / catch
try { caseOrSubComplete(); }
catch (FlowableException e) { if (e.getMessage().contains("Parent process instance") && e.getMessage().contains("suspended")) { activateParentThenRetry(); } else { throw e; } } Prevention
- Suspend definitions with activateProcessInstances=true so live parents can still finish.
- Drain running call-activity children before suspending.
- Alert on suspended instances with active children.
- Schedule suspensions outside expected child completion times.
When it happens
Trigger: A sub process instance completes while its parent execution (executionEntity.isSuspended()) or the parent's process definition (ProcessDefinitionUtil.isProcessDefinitionSuspended) is in suspended state.
Common situations: Administrator suspended the parent process definition (suspendProcessDefinitionById without activateProcessInstances) while child sub instances were still running; those children finish during the suspension window and try to return control.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- Cannot start process instance. Process definition ${processD
- Cannot complete case task. Parent process instance ${executi
- Error while completing sub process of execution ${processIns
- Cannot start a sub process instance. Process model ${process
- No start element found for process definition ${processDefin
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/8c2550d0ab6edef7.
Report an issue: GitHub.