{"record":{"id":"5487d572bc0fdc74","repo":"flowable/flowable-engine","slug":"default-sequence-flow-defaultsequenceflow-cou-5487d5","errorCode":null,"errorMessage":"Default sequence flow '${defaultSequenceFlow}' could not be not found","messagePattern":"Default sequence flow '(.+?)' could not be not found","errorType":"exception","errorClass":"ActivitiException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/InclusiveGatewayActivityBehavior.java","lineNumber":88,"sourceCode":"                            transitionsToTake.add(outgoingTransition);\n                        }\n                    }\n                } else if (SkipExpressionUtil.shouldSkipFlowElement(activityExecution, skipExpression)) {\n                    transitionsToTake.add(outgoingTransition);\n                }\n            }\n\n            if (!transitionsToTake.isEmpty()) {\n                activityExecution.takeAll(transitionsToTake, joinedExecutions);\n\n            } else {\n\n                if (defaultSequenceFlow != null) {\n                    PvmTransition defaultTransition = activityExecution.getActivity().findOutgoingTransition(defaultSequenceFlow);\n                    if (defaultTransition != null) {\n                        activityExecution.take(defaultTransition);\n                    } else {\n                        throw new ActivitiException(\"Default sequence flow '\"\n                                + defaultSequenceFlow + \"' could not be not found\");\n                    }\n                } else {\n                    // No sequence flow could be found, not even a default one\n                    throw new ActivitiException(\n                            \"No outgoing sequence flow of the inclusive gateway '\"\n                                    + activityExecution.getActivity().getId()\n                                    + \"' could be selected for continuing the process\");\n                }\n            }\n\n        } else {\n            if (LOGGER.isDebugEnabled()) {\n                LOGGER.debug(\"Inclusive gateway '{}' does not activate\", activity.getId());\n            }\n        }\n    }\n","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/InclusiveGatewayActivityBehavior.java#L70-L106","documentation":"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.","triggerScenarios":"An inclusive gateway has default='flowX' but no sequence flow with id 'flowX' leaves the gateway, and no outgoing condition evaluates true.","commonSituations":"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.","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"],"exampleFix":"// before\n<inclusiveGateway id=\"gw\" default=\"oldFlow\"/>\n// after\n<inclusiveGateway id=\"gw\" default=\"defaultFlow\"/>\n<sequenceFlow id=\"defaultFlow\" sourceRef=\"gw\" targetRef=\"fallbackTask\"/>","handlingStrategy":"validation","validationCode":"boolean defaultResolvable = gatewayFlows.stream()\n    .anyMatch(f -> f.getId().equals(defaultFlowId));\nif (!defaultResolvable) throw new IllegalStateException(\"inclusive gateway default flow missing: \" + defaultFlowId);","typeGuard":null,"tryCatchPattern":"try { /* execute process */ }\ncatch (ActivitiException e) { if (e.getMessage().contains(\"Default sequence flow\")) { fixGatewayModel(); } throw e; }","preventionTips":["Always configure a valid default flow on inclusive gateways","Validate BPMN at deployment","Keep flow ids stable across refactors"],"tags":["bpmn","gateway","inclusive-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"}