conductor-oss/conductor · error · IllegalArgumentException
Task %s not found
Error message
Task %s not found
What it means
rerun delegates to rerunWF; if rerunWF returns false it means the requested reRunFromTaskId could not be located in the workflow, so an IllegalArgumentException is thrown naming the missing task id. The workflow is not modified.
Source
Thrown at core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutorOps.java:176
task -> {
if (queueDAO.resetOffsetTime(
QueueUtils.getQueueName(task), task.getTaskId())) {
task.setCallbackAfterSeconds(0);
executionDAOFacade.updateTask(task);
}
});
}
@Override
public String rerun(RerunWorkflowRequest request) {
Utils.checkNotNull(request.getReRunFromWorkflowId(), "reRunFromWorkflowId is missing");
if (!rerunWF(
request.getReRunFromWorkflowId(),
request.getReRunFromTaskId(),
request.getTaskInput(),
request.getWorkflowInput(),
request.getCorrelationId())) {
throw new IllegalArgumentException(
"Task " + request.getReRunFromTaskId() + " not found");
}
return request.getReRunFromWorkflowId();
}
/**
* @param workflowId the id of the workflow to be restarted
* @param useLatestDefinitions if true, use the latest workflow and task definitions upon
* restart
* @throws ConflictException Workflow is not in a terminal state.
* @throws NotFoundException Workflow definition is not found or Workflow is deemed
* non-restartable as per workflow definition.
*/
@Override
public void restart(String workflowId, boolean useLatestDefinitions) {
final WorkflowModel workflow = executionDAOFacade.getWorkflowModel(workflowId, true);
if (!workflow.getStatus().isTerminal()) {View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Fetch the workflow's tasks first and confirm the taskId exists before calling rerun.
- If you want to rerun the whole workflow, omit reRunFromTaskId or use restart instead.
- Verify the taskId spelling and that it belongs to the given reRunFromWorkflowId.
Example fix
// before
request.setReRunFromTaskId("wrong-id");
workflowExecutor.rerun(request);
// after
WorkflowModel wf = executionDAOFacade.getWorkflowModel(workflowId, true);
boolean exists = wf.getTasks().stream().anyMatch(t -> t.getTaskId().equals(taskId));
if (exists) { /* rerun */ } else { /* report */ } Defensive patterns
Strategy: validation
Validate before calling
WorkflowModel wf = executionDAOFacade.getWorkflowModel(request.getReRunFromWorkflowId(), true);
boolean exists = wf.getTasks().stream().anyMatch(t -> t.getTaskId().equals(request.getReRunFromTaskId()));
if (!exists) throw new NotFoundException("task " + request.getReRunFromTaskId() + " not in workflow");
workflowExecutor.rerun(request); Try / catch
try {
workflowExecutor.rerun(request);
} catch (IllegalArgumentException e) {
// taskId not found; verify id or rerun whole workflow
} Prevention
- Verify the taskId exists in the workflow before calling rerun.
- Omit reRunFromTaskId (or use restart) to rerun the whole workflow.
- Avoid copy-pasting task ids across workflows.
When it happens
Trigger: Calling WorkflowExecutor.rerun (or the rerun API) with a RerunWorkflowRequest whose reRunFromTaskId does not match any task in the workflow (or the workflow has no tasks).
Common situations: Stale or copy-pasted task id; rerun issued against the wrong workflow; task was pruned/compacted; typos in the task id.
Related errors
- Workflow is in terminal state. Status = %s
- Workflow: %s is not in terminal state, unable to restart.
- Workflow: %s is non-restartable
- Cannot archive workflow: %s with status: %s
- Task %s failed with status: %s and reason: '%s'
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/b357f373caa7fe2f.
Report an issue: GitHub.