flowable/flowable-engine · error · FlowableException
No parent process found for execution with activity id
Error message
No parent process found for execution with activity id ${activityId} What it means
When the move operation requests moveToParentProcess (move out to the parent process of a callActivity instance), the code resolves the current process instance's superExecution. If it is null, the process instance is not a subprocess instance of a call activity, so there is no parent process to move to.
Solutions
- Only use moveToParentProcess on process instances spawned by a callActivity; verify execution.getSuperExecution() exists first
- If you intended a plain move within the same process, use moveActivityIdTo instead
- If the parent scope already ended, restart the desired parent process instance instead of moving
Example fix
// before
.moveActivityIdToParentProcess("childTask"); // root instance
// after
if (execution.getSuperExecution() != null) {
builder.moveActivityIdToParentProcess("childTask");
} else {
builder.moveActivityIdTo("childTask", "nextTask");
} Defensive patterns
Strategy: validation
Validate before calling
Execution exec = runtimeService.createExecutionQuery().processInstanceId(piId).singleResult(); boolean hasParent = exec != null && ((ExecutionEntity) exec).getSuperExecution() != null;
Try / catch
try { builder.changeState(); } catch (FlowableException e) { if (e.getMessage().startsWith("No parent process found")) { /* use same-process move instead */ } else throw e; } Prevention
- Only call moveToParentProcess for instances created by a callActivity
- Verify superExecution existence first
- Prefer moveActivityIdTo for intra-process moves
When it happens
Trigger: Calling moveActivityIdToParentProcess() (or equivalent container flag) on a top-level process instance that was not started via a callActivity, or whose parent callActivity execution already terminated.
Common situations: Misusing moveToParentProcess on a root process instance; attempting the move after the parent callActivity scope was already left or terminated; wrong process instance (not the child of the call activity).
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
- a suspended
- Can not activate job
- Cannot combine onlyInbound() with onlyOutbound() in the…
- Cannot combine onlyOutbound() with onlyInbound() in the…
- Cannot execute operation because process definition '" +…
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/1659cfd4765e08e6.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/dynamic/AbstractDynamicStateManager.java:345
if (executions.isEmpty()) {
throw new FlowableIllegalArgumentException("Active execution could not be found with activity id " + activityId);
}
return executions;
}
protected MoveExecutionEntityContainer createMoveExecutionEntityContainer(MoveActivityIdContainer activityContainer, List<ExecutionEntity> executions, CommandContext commandContext) {
MoveExecutionEntityContainer moveExecutionEntityContainer = new MoveExecutionEntityContainer(executions,
activityContainer.getMoveToActivityIds(), activityContainer.getActivityOptions());
if (moveExecutionEntityContainer.getActivityOptions() != null) {
activityContainer.setActivityOptions(moveExecutionEntityContainer.getActivityOptions());
}
if (activityContainer.isMoveToParentProcess()) {
ExecutionEntity processInstanceExecution = executions.get(0).getProcessInstance();
ExecutionEntity superExecution = processInstanceExecution.getSuperExecution();
if (superExecution == null) {
throw new FlowableException("No parent process found for execution with activity id " + executions.get(0).getCurrentActivityId());
}
moveExecutionEntityContainer.setMoveToParentProcess(true);
moveExecutionEntityContainer.setSuperExecution(superExecution);
} else if (activityContainer.isMoveToSubProcessInstance()) {
moveExecutionEntityContainer.setMoveToSubProcessInstance(true);
moveExecutionEntityContainer.setCallActivityId(activityContainer.getCallActivityId());
moveExecutionEntityContainer.setCallActivitySubProcessVersion(activityContainer.getCallActivitySubProcessVersion());
}
return moveExecutionEntityContainer;
}
protected void prepareMoveExecutionEntityContainer(MoveExecutionEntityContainer moveExecutionContainer, ProcessDefinition migrateToProcessDefinition, CommandContext commandContext) {
ExpressionManager expressionManager = CommandContextUtil.getProcessEngineConfiguration(commandContext).getExpressionManager();
BpmnModel bpmnModelToMigrateTo = null;
if (migrateToProcessDefinition != null) {View on GitHub (pinned to d6d39ce1c6)