flowable/flowable-engine · error · ActivitiException
No outgoing sequence flow of the exclusive gateway
Error message
No outgoing sequence flow of the exclusive gateway '${activityId}' could be selected for continuing the process What it means
ExclusiveGatewayActivityBehavior.leave() throws this ActivitiException when no outgoing sequence flow's condition evaluates true and the gateway has no default flow at all. The engine cannot decide where to continue, so instead of guessing it fails with the gateway's activity id.
Solutions
- Add a default sequence flow to the gateway so there is always a fallback route
- Fix the conditions and/or ensure the required variables are set before the gateway
- Ensure exactly one condition is unconditional-true or restructure with a condition that always matches
- Inspect the process variables at the gateway (e.g. via TaskService/history) to see why all conditions fail
Example fix
// before <exclusiveGateway id="gw"/> // after <exclusiveGateway id="gw" default="fallback"/> <sequenceFlow id="fallback" sourceRef="gw" targetRef="defaultTask"/>
Defensive patterns
Strategy: validation
Validate before calling
// Before the gateway: guarantee the deciding variables exist
if (variables.get("decisionVar") == null) throw new IllegalStateException("decisionVar missing before exclusive gateway"); Try / catch
try { runtimeService.startProcessInstanceByKey(key, vars); }
catch (ActivitiException e) { if (e.getMessage().contains("No outgoing sequence flow of the exclusive gateway")) { logMissingVars(vars); } throw e; } Prevention
- Configure a default flow on every exclusive gateway
- Ensure required variables are set before gateways
- Cover all condition branches in tests
When it happens
Trigger: Execution reaches an exclusive gateway where every outgoing conditionExpression evaluates false and no default attribute is configured.
Common situations: Conditions depend on process variables that are absent or of the wrong type at runtime; exclusive gateways added after process refactor without a fallback path.
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
- Default sequence flow
- No outgoing sequence flow of element
- No outgoing sequence flow of the inclusive gateway
- No outgoing sequence flow of the inclusive gateway
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/d72bbe9151149be2.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/ExclusiveGatewayActivityBehavior.java:87
} else if (SkipExpressionUtil.shouldSkipFlowElement(execution, skipExpression)) {
outgoingSeqFlow = seqFlow;
}
}
if (outgoingSeqFlow != null) {
execution.take(outgoingSeqFlow);
} else {
if (defaultSequenceFlow != null) {
PvmTransition defaultTransition = execution.getActivity().findOutgoingTransition(defaultSequenceFlow);
if (defaultTransition != null) {
execution.take(defaultTransition);
} else {
throw new ActivitiException("Default sequence flow '" + defaultSequenceFlow + "' not found");
}
} else {
// No sequence flow could be found, not even a default one
throw new ActivitiException("No outgoing sequence flow of the exclusive gateway '"
+ execution.getActivity().getId() + "' could be selected for continuing the process");
}
}
}
}
View on GitHub (pinned to d6d39ce1c6)