flowable/flowable-engine · error · ActivitiException
Default sequence flow
Error message
Default sequence flow '${defaultSequenceFlow}' could not be not found What it means
InclusiveGatewayActivityBehavior.execute() evaluates all outgoing conditions, activates the matching ones, and falls back to the gateway's default flow when none match. If a default flow id is configured but no outgoing sequence flow with that id exists, it throws ActivitiException since the fallback route cannot be resolved.
Solutions
- Add or rename a sequence flow so its id matches the gateway's default attribute
- Remove the default attribute if no fallback is intended and ensure at least one condition always matches
- Run the process model validator at deployment to catch dangling default flow references
Example fix
// before <inclusiveGateway id="gw" default="oldFlow"/> // after <inclusiveGateway id="gw" default="defaultFlow"/> <sequenceFlow id="defaultFlow" sourceRef="gw" targetRef="fallbackTask"/>
Defensive patterns
Strategy: validation
Validate before calling
boolean defaultResolvable = gatewayFlows.stream()
.anyMatch(f -> f.getId().equals(defaultFlowId));
if (!defaultResolvable) throw new IllegalStateException("inclusive gateway default flow missing: " + defaultFlowId); Try / catch
try { /* execute process */ }
catch (ActivitiException e) { if (e.getMessage().contains("Default sequence flow")) { fixGatewayModel(); } throw e; } Prevention
- Always configure a valid default flow on inclusive gateways
- Validate BPMN at deployment
- Keep flow ids stable across refactors
When it happens
Trigger: An inclusive gateway has default='flowX' but no sequence flow with id 'flowX' leaves the gateway, and no outgoing condition evaluates true.
Common situations: BPMN refactors renaming/deleting sequence flows while the default attribute still points to the old id; hand-edited XML or generated models with dangling references.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Default sequence flow
- No outgoing sequence flow of the inclusive gateway
- Default sequence flow
- No outgoing sequence flow of element
- No outgoing sequence flow of the exclusive gateway
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/5487d572bc0fdc74.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/InclusiveGatewayActivityBehavior.java:88
transitionsToTake.add(outgoingTransition);
}
}
} else if (SkipExpressionUtil.shouldSkipFlowElement(activityExecution, skipExpression)) {
transitionsToTake.add(outgoingTransition);
}
}
if (!transitionsToTake.isEmpty()) {
activityExecution.takeAll(transitionsToTake, joinedExecutions);
} else {
if (defaultSequenceFlow != null) {
PvmTransition defaultTransition = activityExecution.getActivity().findOutgoingTransition(defaultSequenceFlow);
if (defaultTransition != null) {
activityExecution.take(defaultTransition);
} else {
throw new ActivitiException("Default sequence flow '"
+ defaultSequenceFlow + "' could not be not found");
}
} else {
// No sequence flow could be found, not even a default one
throw new ActivitiException(
"No outgoing sequence flow of the inclusive gateway '"
+ activityExecution.getActivity().getId()
+ "' could be selected for continuing the process");
}
}
} else {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Inclusive gateway '{}' does not activate", activity.getId());
}
}
}
View on GitHub (pinned to d6d39ce1c6)