{"record":{"id":"dffde69712182f8f","repo":"conductor-oss/conductor","slug":"no-tasks-found-to-be-executed","errorCode":null,"errorMessage":"No tasks found to be executed","messagePattern":"No tasks found to be executed","errorType":"exception","errorClass":"TerminateWorkflowException","httpStatus":null,"severity":"warning","filePath":"core/src/main/java/com/netflix/conductor/core/execution/DeciderService.java","lineNumber":360,"sourceCode":"                .filter(\n                        runningTask ->\n                                !tasksInWorkflow.contains(runningTask.getReferenceTaskName()))\n                .collect(Collectors.toList());\n    }\n\n    private List<TaskModel> startWorkflow(WorkflowModel workflow)\n            throws TerminateWorkflowException {\n        final WorkflowDef workflowDef = workflow.getWorkflowDefinition();\n\n        LOGGER.debug(\"Starting workflow: {}\", workflow);\n\n        // The tasks will be empty in case of new workflow\n        List<TaskModel> tasks = workflow.getTasks();\n        // Check if the workflow is a re-run case or if it is a new workflow execution\n        if (workflow.getReRunFromWorkflowId() == null || tasks.isEmpty()) {\n\n            if (workflowDef.getTasks().isEmpty()) {\n                throw new TerminateWorkflowException(\n                        \"No tasks found to be executed\", WorkflowModel.Status.COMPLETED);\n            }\n\n            WorkflowTask taskToSchedule =\n                    workflowDef\n                            .getTasks()\n                            .get(0); // Nothing is running yet - so schedule the first task\n            // Loop until a non-skipped task is found\n            while (isTaskSkipped(taskToSchedule, workflow)) {\n                taskToSchedule = workflowDef.getNextTask(taskToSchedule.getTaskReferenceName());\n            }\n\n            // In case of a new workflow, the first non-skippable task will be scheduled\n            return getTasksToBeScheduled(workflow, taskToSchedule, 0);\n        }\n\n        // Get the first task to schedule\n        TaskModel rerunFromTask =","sourceCodeStart":342,"sourceCodeEnd":378,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/core/src/main/java/com/netflix/conductor/core/execution/DeciderService.java#L342-L378","documentation":"In startWorkflow, if the WorkflowDef has no tasks at all (getTasks().isEmpty()), the engine immediately throws a TerminateWorkflowException with status COMPLETED. An empty definition cannot schedule anything, so the workflow is terminated as completed with no work done — usually indicating a misdefined workflow.","triggerScenarios":"Starting or rerunning a workflow whose WorkflowDef.tasks list is empty.","commonSituations":"A workflow definition was registered with no task steps; a dynamic workflow payload omits the tasks array; a parent workflow spawns a sub-workflow whose definition was stripped of tasks.","solutions":["Register a WorkflowDef that contains at least one WorkflowTask.","Validate the workflow definition (tasks non-empty) before starting it.","If the empty-tasks case is intentional, treat the COMPLETED termination as expected and do not alarm on it."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Reject empty workflow definitions at registration time.\nif (def.getTasks() == null || def.getTasks().isEmpty()) {\n    throw new IllegalArgumentException(\"WorkflowDef \" + def.getName() + \" has no tasks\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    workflowExecutor.startWorkflow(...);\n} catch (TerminateWorkflowException e) {\n    if (e.getMessage().contains(\"No tasks found\")) {\n        // definition defect; fix and re-register\n    }\n}","preventionTips":["Validate WorkflowDef.tasks is non-empty before registering.","Treat an empty-tasks workflow as a definition smell, not a runtime strategy.","Unit-test workflow definitions at registration time."],"tags":["conductor","workflow","decider","workflow-definition","configuration"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}