{"record":{"id":"d13f562dc958e390","repo":"flowable/flowable-engine","slug":"no-outgoing-sequence-flow-of-the-inclusive-gateway","errorCode":null,"errorMessage":"No outgoing sequence flow of the inclusive gateway '${activityId}' could be selected for continuing the process","messagePattern":"No outgoing sequence flow of the inclusive 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/BpmnActivityBehavior.java","lineNumber":179,"sourceCode":"\n                Object isForCompensation = execution.getActivity().getProperty(BpmnParse.PROPERTYNAME_IS_FOR_COMPENSATION);\n                if (isForCompensation != null && (Boolean) isForCompensation) {\n                    if (execution instanceof ExecutionEntity) {\n                        Context.getCommandContext().getHistoryManager().recordActivityEnd((ExecutionEntity) execution);\n                    }\n                    InterpretableExecution parentExecution = (InterpretableExecution) execution.getParent();\n                    ((InterpretableExecution) execution).remove();\n                    parentExecution.signal(\"compensationDone\", null);\n\n                } else {\n\n                    if (LOGGER.isDebugEnabled()) {\n                        LOGGER.debug(\"No outgoing sequence flow found for {}. Ending execution.\", execution.getActivity().getId());\n                    }\n                    execution.end();\n\n                    if (throwExceptionIfExecutionStuck) {\n                        throw new ActivitiException(\"No outgoing sequence flow of the inclusive gateway '\" + execution.getActivity().getId()\n                                + \"' could be selected for continuing the process\");\n                    }\n                }\n\n            }\n        }\n    }\n\n}\n","sourceCodeStart":161,"sourceCodeEnd":189,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/BpmnActivityBehavior.java#L161-L189","documentation":"In performOutgoingBehavior, when no outgoing sequence flow can be selected (all conditions false and no default flow exists) the execution ends, and if throwExceptionIfExecutionStuck is enabled an ActivitiException is thrown reporting the activity id where the process got stuck. It prevents silent, stuck process instances.","triggerScenarios":"Reaching an inclusive gateway whose incoming token satisfies no outgoing flow condition and which has no (resolvable) default flow, with the engine configured to throw on stuck executions.","commonSituations":"Conditions written against variables that are missing or of unexpected type at runtime, so every condition evaluates false; incomplete gateway configurations after process model changes.","solutions":["Add a default sequence flow (default attribute) to the inclusive gateway as a catch-all","Fix/loosen the outgoing flow conditions and ensure required variables are set before the gateway","Set throwExceptionIfExecutionStuck=false if silently ending is acceptable (usually not)","Log execution variables at the gateway to see why all conditions fail"],"exampleFix":"// before\n<inclusiveGateway id=\"gw1\"/>\n<sequenceFlow id=\"f1\" sourceRef=\"gw1\" targetRef=\"a\"><conditionExpression xsi:type=\"tFormalExpression\">${x > 10}</conditionExpression></sequenceFlow>\n// after\n<inclusiveGateway id=\"gw1\" default=\"fDefault\"/>\n<sequenceFlow id=\"f1\" sourceRef=\"gw1\" targetRef=\"a\"><conditionExpression xsi:type=\"tFormalExpression\">${x > 10}</conditionExpression></sequenceFlow>\n<sequenceFlow id=\"fDefault\" sourceRef=\"gw1\" targetRef=\"b\"/>","handlingStrategy":"validation","validationCode":"// Before the gateway, ensure a fallback exists and required variables are present\nif (execution.getVariable(\"x\") == null) throw new IllegalStateException(\"variable x required before gateway\");","typeGuard":null,"tryCatchPattern":"try { /* advance process */ }\ncatch (ActivitiException e) {\n  if (e.getMessage().contains(\"No outgoing sequence flow\")) { alertStuckProcess(activityId); }\n  throw e;\n}","preventionTips":["Always add a default flow to inclusive gateways","Verify condition variables are set before gateways","Test all condition branches in CI"],"tags":["bpmn","gateway","sequence-flow","stuck-execution"],"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"}