{"record":{"id":"b1938a50fe2c7ecd","repo":"flowable/flowable-engine","slug":"default-sequence-flow-defaultsequenceflow-not","errorCode":null,"errorMessage":"Default sequence flow '${defaultSequenceFlow}' not found","messagePattern":"Default sequence flow '(.+?)' not found","errorType":"exception","errorClass":"ActivitiException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/ExclusiveGatewayActivityBehavior.java","lineNumber":83,"sourceCode":"                        LOGGER.debug(\"Sequence flow '{}' selected as outgoing sequence flow.\", seqFlow.getId());\n                    }\n                    outgoingSeqFlow = seqFlow;\n                }\n            } 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":65,"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#L65-L94","documentation":"ExclusiveGatewayActivityBehavior.leave() evaluates outgoing conditions and, if none matches, falls back to the gateway's default flow. When a default flow id is configured but no outgoing transition with that id exists on the gateway, it throws ActivitiException because the configured default route cannot be resolved.","triggerScenarios":"An exclusive gateway has default='flowX' but no sequence flow with id 'flowX' leaves the gateway, and no other outgoing condition evaluated true.","commonSituations":"Sequence flow renamed/deleted after the default attribute was set; XML edited by hand or by tooling that changed flow ids.","solutions":["Ensure a sequence flow with an id exactly matching the gateway's default attribute exists","Remove the default attribute if no default is wanted and instead guarantee one condition always matches","Validate the process definition at deployment to catch dangling default flow references"],"exampleFix":"// before\n<exclusiveGateway id=\"gw\" default=\"gone\"/>\n// after\n<exclusiveGateway id=\"gw\" default=\"flowDefault\"/>\n<sequenceFlow id=\"flowDefault\" sourceRef=\"gw\" targetRef=\"else\"/>","handlingStrategy":"validation","validationCode":"boolean ok = gateway.getOutgoingFlows().stream()\n    .anyMatch(f -> f.getId().equals(gateway.getDefaultFlow()));\nif (!ok) throw new IllegalStateException(\"default flow id dangling\");","typeGuard":null,"tryCatchPattern":"try { /* execute process */ }\ncatch (ActivitiException e) { if (e.getMessage().contains(\"Default sequence flow\")) { repairModel(); } throw e; }","preventionTips":["Validate models at deploy time","Ensure at least one gateway condition always evaluates true","Keep default attribute ids in sync during refactors"],"tags":["bpmn","gateway","exclusive-gateway","sequence-flow"],"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"}