{"record":{"id":"d72bbe9151149be2","repo":"flowable/flowable-engine","slug":"no-outgoing-sequence-flow-of-the-exclusive-gateway-d72bbe","errorCode":null,"errorMessage":"No outgoing sequence flow of the exclusive gateway '${activityId}' could be selected for continuing the process","messagePattern":"No outgoing sequence flow of the exclusive gateway '(.+?)' could be selected for continuing the process","errorType":"exception","errorClass":"ActivitiException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/ExclusiveGatewayActivityBehavior.java","lineNumber":87,"sourceCode":"            } else if (SkipExpressionUtil.shouldSkipFlowElement(execution, skipExpression)) {\n                outgoingSeqFlow = seqFlow;\n            }\n        }\n\n        if (outgoingSeqFlow != null) {\n            execution.take(outgoingSeqFlow);\n        } else {\n\n            if (defaultSequenceFlow != null) {\n                PvmTransition defaultTransition = execution.getActivity().findOutgoingTransition(defaultSequenceFlow);\n                if (defaultTransition != null) {\n                    execution.take(defaultTransition);\n                } else {\n                    throw new ActivitiException(\"Default sequence flow '\" + defaultSequenceFlow + \"' not found\");\n                }\n            } else {\n                // No sequence flow could be found, not even a default one\n                throw new ActivitiException(\"No outgoing sequence flow of the exclusive gateway '\"\n                        + execution.getActivity().getId() + \"' could be selected for continuing the process\");\n            }\n        }\n    }\n\n}\n","sourceCodeStart":69,"sourceCodeEnd":94,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/ExclusiveGatewayActivityBehavior.java#L69-L94","documentation":"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.","triggerScenarios":"Execution reaches an exclusive gateway where every outgoing conditionExpression evaluates false and no default attribute is configured.","commonSituations":"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.","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"],"exampleFix":"// before\n<exclusiveGateway id=\"gw\"/>\n// after\n<exclusiveGateway id=\"gw\" default=\"fallback\"/>\n<sequenceFlow id=\"fallback\" sourceRef=\"gw\" targetRef=\"defaultTask\"/>","handlingStrategy":"validation","validationCode":"// Before the gateway: guarantee the deciding variables exist\nif (variables.get(\"decisionVar\") == null) throw new IllegalStateException(\"decisionVar missing before exclusive gateway\");","typeGuard":null,"tryCatchPattern":"try { runtimeService.startProcessInstanceByKey(key, vars); }\ncatch (ActivitiException e) { if (e.getMessage().contains(\"No outgoing sequence flow of the exclusive gateway\")) { logMissingVars(vars); } throw e; }","preventionTips":["Configure a default flow on every exclusive gateway","Ensure required variables are set before gateways","Cover all condition branches in tests"],"tags":["bpmn","gateway","exclusive-gateway","conditions"],"backgroundTag":"resource-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}