{"record":{"id":"c55c260a84b3a0fc","repo":"kestra-io/kestra","slug":"cannot-execute-a-flow-which-is-disabled","errorCode":null,"errorMessage":"Cannot execute a flow which is disabled","messagePattern":"Cannot execute a flow which is disabled","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/io/kestra/core/runners/ExecutableUtils.java","lineNumber":195,"sourceCode":"                    currentExecution.getTenantId(),\n                    subflowNamespace,\n                    subflowId,\n                    subflowRevision,\n                    currentExecution.getTenantId(),\n                    currentFlow.getNamespace(),\n                    currentFlow.getId()\n                )\n                    .orElseThrow(() ->\n                    {\n                        String msg = \"Unable to find flow '\" + subflowNamespace + \"'.'\" + subflowId + \"' with revision '\" + subflowRevision.orElse(0) + \"'\";\n                        runContext.logger().error(msg);\n                        return new IllegalStateException(msg);\n                    });\n\n                if (flow.isDisabled()) {\n                    String msg = \"Cannot execute a flow which is disabled\";\n                    runContext.logger().error(msg);\n                    throw new IllegalStateException(msg);\n                }\n\n                if (flow instanceof FlowWithException fwe) {\n                    String msg = \"Cannot execute an invalid flow: \" + fwe.getException();\n                    runContext.logger().error(msg);\n                    throw new IllegalStateException(msg);\n                }\n\n                List<Label> newLabels = inheritLabels ? new ArrayList<>(filterLabels(currentExecution.getLabels(), flow)) : new ArrayList<>(systemLabels(currentExecution));\n                if (labels != null) {\n                    labels.forEach(throwConsumer(label -> newLabels.add(new Label(runContext.render(label.key()), runContext.render(label.value())))));\n                }\n\n                var variables = ImmutableMap.<String, Object> builder().putAll(\n                    Map.of(\n                        \"executionId\", currentExecution.getId(),\n                        \"namespace\", currentFlow.getNamespace(),\n                        \"flowId\", currentFlow.getId(),","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/kestra-io/kestra/blob/823fada9274c4f9c251ea0a516460a4f7d958032/core/src/main/java/io/kestra/core/runners/ExecutableUtils.java#L177-L213","documentation":"Error \"Cannot execute a flow which is disabled\" thrown in kestra-io/kestra.","triggerScenarios":"Thrown at core/src/main/java/io/kestra/core/runners/ExecutableUtils.java:195 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable the flow (remove or set 'disabled: false') before executing it.","If the disable was intentional, choose a different, enabled flow to execute."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"823fada9274c4f9c251ea0a516460a4f7d958032","analyzedAt":"2026-08-14T06:15:17.947Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}