{"record":{"id":"ac3c14999a76005e","repo":"flowable/flowable-engine","slug":"no-outgoing-sequence-flow-of-element-flownode-g","errorCode":null,"errorMessage":"No outgoing sequence flow of element '${flowNode.getId()}' could be selected for continuing the process for ${execution}","messagePattern":"No outgoing sequence flow of element '(.+?)' could be selected for continuing the process for (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/agenda/TakeOutgoingSequenceFlowsOperation.java","lineNumber":250,"sourceCode":"        if (outgoingSequenceFlows.size() == 0 && evaluateConditions) { // The elements that set this to false also have no support for default sequence flow\n            if (defaultSequenceFlowId != null) {\n                for (SequenceFlow sequenceFlow : flowNode.getOutgoingFlows()) {\n                    if (defaultSequenceFlowId.equals(sequenceFlow.getId())) {\n                        outgoingSequenceFlows.add(sequenceFlow);\n                        break;\n                    }\n                }\n            }\n        }\n\n        // No outgoing found. Ending the execution\n        if (outgoingSequenceFlows.size() == 0) {\n            if (flowNode.getOutgoingFlows() == null || flowNode.getOutgoingFlows().size() == 0) {\n                LOGGER.debug(\"No outgoing sequence flow found for flow node '{}'.\", flowNode.getId());\n                agenda.planEndExecutionOperation(execution);\n\n            } else {\n                throw new FlowableException(\"No outgoing sequence flow of element '\" + flowNode.getId() + \"' could be selected for continuing the process for \" + execution);\n            }\n\n        } else {\n\n            // Leave, and reuse the incoming sequence flow, make executions for all the others (if applicable)\n            ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);\n            ExecutionEntityManager executionEntityManager = processEngineConfiguration.getExecutionEntityManager();\n            List<ExecutionEntity> outgoingExecutions = new ArrayList<>(flowNode.getOutgoingFlows().size());\n\n            SequenceFlow sequenceFlow = outgoingSequenceFlows.get(0);\n\n            // Reuse existing one\n            execution.setCurrentFlowElement(sequenceFlow);\n            execution.setActive(false);\n            outgoingExecutions.add(execution);\n\n            // Executions for all the other one\n            if (outgoingSequenceFlows.size() > 1) {","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/agenda/TakeOutgoingSequenceFlowsOperation.java#L232-L268","documentation":"After leaving a flow node, TakeOutgoingSequenceFlowsOperation must select outgoing sequence flows. If conditions on existing outgoing flows prevented all of them from being taken, the execution has nowhere to go and the engine throws this FlowableException instead of silently stalling.","triggerScenarios":"leaveFlowNode (from handleFlowNode or handleAdhocSubProcess): the node has outgoing flows defined, but every conditional flow evaluated false and there is no default flow, leaving zero selected flows.","commonSituations":"Exclusive gateways/tasks with conditions like ${amount > 100} that no branch matches; data-driven conditions not satisfied by actual variables; missing default flow.","solutions":["Add a default flow (default attribute) to the node/gateway to catch unmatched cases","Audit condition expressions and the variable values at runtime (check execution variables)","Make one condition a catch-all (e.g. true) if a branch must always be taken","Fix the data/process so a branch condition is always satisfied"],"exampleFix":"// before\n<exclusiveGateway id=\"decision\" />\n<sequenceFlow id=\"f1\" sourceRef=\"decision\" targetRef=\"big\"><conditionExpression>${amount > 100}</conditionExpression></sequenceFlow>\n<sequenceFlow id=\"f2\" sourceRef=\"decision\" targetRef=\"small\"><conditionExpression>${amount > 500}</conditionExpression></sequenceFlow>\n// after\n<exclusiveGateway id=\"decision\" default=\"f2\" />\n<sequenceFlow id=\"f1\" sourceRef=\"decision\" targetRef=\"big\"><conditionExpression>${amount > 100}</conditionExpression></sequenceFlow>\n<sequenceFlow id=\"f2\" sourceRef=\"decision\" targetRef=\"small\" />","handlingStrategy":"validation","validationCode":"// Ensure every exclusive gateway has a default flow before deploying\nfor (Gateway gw : bpmnModel.getMainProcess().findElementsOfProcess(Gateway.class)) {\n    if (gw instanceof ExclusiveGateway && ((ExclusiveGateway) gw).getDefaultFlow() == null\n        && gw.getOutgoingFlows().stream().allMatch(f -> f.getConditionExpression() != null)) {\n        throw new IllegalStateException(\"Gateway \" + gw.getId() + \" lacks a default flow\");\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    // process advance\n} catch (FlowableException e) {\n    if (e.getMessage().startsWith(\"No outgoing sequence flow\")) {\n        log.error(\"Unmatched conditions at node {}; check variables: {}\", extractNodeId(e), vars);\n    }\n    throw e;\n}","preventionTips":["Add default flows to all exclusive gateways","Test decision tables/conditions with boundary values","Log variables at gateways for diagnosis","Cover all branches in process integration tests"],"tags":["java","flowable","bpmn","sequence-flow","conditions"],"backgroundTag":"invalid-state-transition","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}