flowable/flowable-engine · error · FlowableException
Error while completing sub process of execution ${processIns
Error message
Error while completing sub process of execution ${processInstanceExecution} What it means
When a process-instance-level execution ends inside a call activity's child, EndExecutionOperation notifies the parent's SubProcessActivityBehavior.completing(...). Any Exception (checked) thrown by that behavior is wrapped in this FlowableException; RuntimeExceptions rethrown keep their type. The message is a wrapper — the cause holds the real error.
Source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/agenda/EndExecutionOperation.java:111
ExecutionEntity superExecution = processInstanceExecution.getSuperExecution();
if (!forceSynchronous && isAsyncCompleteCallActivity(superExecution)) {
scheduleAsyncCompleteCallActivity(superExecution, processInstanceExecution);
return;
}
// copy variables before destroying the ended sub process instance (call activity)
SubProcessActivityBehavior subProcessActivityBehavior = null;
if (superExecution != null) {
FlowNode superExecutionElement = (FlowNode) superExecution.getCurrentFlowElement();
subProcessActivityBehavior = (SubProcessActivityBehavior) superExecutionElement.getBehavior();
try {
subProcessActivityBehavior.completing(superExecution, processInstanceExecution);
} catch (RuntimeException e) {
LOGGER.error("Error while completing sub process of execution {}", processInstanceExecution, e);
throw e;
} catch (Exception e) {
LOGGER.error("Error while completing sub process of execution {}", processInstanceExecution, e);
throw new FlowableException("Error while completing sub process of execution " + processInstanceExecution, e);
}
}
int activeExecutions = getNumberOfActiveChildExecutionsForProcessInstance(executionEntityManager, processInstanceId);
if (activeExecutions == 0) {
LOGGER.debug("No active executions found. Ending process instance {}", processInstanceId);
// note the use of execution here vs processinstance execution for getting the flow element
executionEntityManager.deleteProcessInstanceExecutionEntity(processInstanceId,
execution.getCurrentFlowElement() != null ? execution.getCurrentFlowElement().getId() : null, null, false, false, true);
} else {
LOGGER.debug("Active executions found. Process instance {} will not be ended.", processInstanceId);
}
Process process = ProcessDefinitionUtil.getProcess(processInstanceExecution.getProcessDefinitionId());
// Execute execution listeners for process end.
if (CollectionUtil.isNotEmpty(process.getExecutionListeners())) {View on GitHub (pinned to d6d39ce1c6)
Solutions
- Inspect the cause chain of this FlowableException for the underlying exception
- Fix the failing ActivityBehavior or wrap its logic to convert/handle checked exceptions
- Add error boundary events / job retries if the failing work is external
Example fix
// before (custom behavior)
public void completing(DelegateExecution superExecution, DelegateExecution subProcessExecution) throws Exception {
externalClient.notifyDone(); // throws checked IOException
}
// after
public void completing(DelegateExecution superExecution, DelegateExecution subProcessExecution) {
try {
externalClient.notifyDone();
} catch (IOException e) {
throw new RuntimeException("Sub-process completion callback failed", e);
}
} Defensive patterns
Strategy: try-catch
Try / catch
try {
// operation ending the sub-process execution
} catch (FlowableException e) {
log.error("Sub-process completing failed, cause: {}", e.getCause(), e.getCause());
throw e;
} Prevention
- Always inspect the cause chain on this wrapper exception
- Avoid checked exceptions in custom ActivityBehaviors
- Make external calls in behaviors async/retriable
- Log inside custom behaviors with execution context
When it happens
Trigger: The child process instance's execution ends while the call activity's behavior (completing phase) throws a checked Exception in the super execution.
Common situations: Custom ActivityBehavior implementations in the parent process throwing checked exceptions; delegation to business logic that fails (IO, service calls) during sub-process completion.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Could not complete parent process instance for call activity
- text is null
- bytes array is null
- problem reading zip input stream
- Deployment id is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/67eed4d89ca517c8.
Report an issue: GitHub.