conductor-oss/conductor · warning · TerminateWorkflowException

No tasks found to be executed

Error message

No tasks found to be executed

What it means

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.

Source

Thrown at core/src/main/java/com/netflix/conductor/core/execution/DeciderService.java:360

                .filter(
                        runningTask ->
                                !tasksInWorkflow.contains(runningTask.getReferenceTaskName()))
                .collect(Collectors.toList());
    }

    private List<TaskModel> startWorkflow(WorkflowModel workflow)
            throws TerminateWorkflowException {
        final WorkflowDef workflowDef = workflow.getWorkflowDefinition();

        LOGGER.debug("Starting workflow: {}", workflow);

        // The tasks will be empty in case of new workflow
        List<TaskModel> tasks = workflow.getTasks();
        // Check if the workflow is a re-run case or if it is a new workflow execution
        if (workflow.getReRunFromWorkflowId() == null || tasks.isEmpty()) {

            if (workflowDef.getTasks().isEmpty()) {
                throw new TerminateWorkflowException(
                        "No tasks found to be executed", WorkflowModel.Status.COMPLETED);
            }

            WorkflowTask taskToSchedule =
                    workflowDef
                            .getTasks()
                            .get(0); // Nothing is running yet - so schedule the first task
            // Loop until a non-skipped task is found
            while (isTaskSkipped(taskToSchedule, workflow)) {
                taskToSchedule = workflowDef.getNextTask(taskToSchedule.getTaskReferenceName());
            }

            // In case of a new workflow, the first non-skippable task will be scheduled
            return getTasksToBeScheduled(workflow, taskToSchedule, 0);
        }

        // Get the first task to schedule
        TaskModel rerunFromTask =

View on GitHub (pinned to cf7c3e4a8a)

Solutions

  1. Register a WorkflowDef that contains at least one WorkflowTask.
  2. Validate the workflow definition (tasks non-empty) before starting it.
  3. If the empty-tasks case is intentional, treat the COMPLETED termination as expected and do not alarm on it.
Defensive patterns

Strategy: validation

Validate before calling

// Reject empty workflow definitions at registration time.
if (def.getTasks() == null || def.getTasks().isEmpty()) {
    throw new IllegalArgumentException("WorkflowDef " + def.getName() + " has no tasks");
}

Try / catch

try {
    workflowExecutor.startWorkflow(...);
} catch (TerminateWorkflowException e) {
    if (e.getMessage().contains("No tasks found")) {
        // definition defect; fix and re-register
    }
}

Prevention

When it happens

Trigger: Starting or rerunning a workflow whose WorkflowDef.tasks list is empty.

Common situations: 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.

Related errors


AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14). Data as JSON: /api/errors/dffde69712182f8f. Report an issue: GitHub.