conductor-oss/conductor · error · NotFoundException
Workflow: %s is non-restartable
Error message
Workflow: %s is non-restartable
What it means
restart checks WorkflowDef.isRestartable(); if it is false AND the workflow status is COMPLETED, the engine throws a NotFoundException with the 'non-restartable' message. The intent is to allow restarting failed/timed-out workflows even when restart is disabled, but to block restarting successfully completed workflows when the definition opts out.
Source
Thrown at core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutorOps.java:236
() ->
metadataDAO
.getWorkflowDef(
workflow.getWorkflowName(),
workflow.getWorkflowVersion())
.orElseThrow(
() ->
new NotFoundException(
"Unable to find definition for %s",
workflowId)));
}
if (!workflowDef.isRestartable()
&& workflow.getStatus()
.equals(
WorkflowModel.Status
.COMPLETED)) { // Can only restart non-completed workflows
// when the configuration is set to false
throw new NotFoundException("Workflow: %s is non-restartable", workflow);
}
// Reset the workflow in the primary datastore and remove from indexer; then
// re-create it
executionDAOFacade.resetWorkflow(workflowId);
workflow.getTasks().clear();
workflow.setReasonForIncompletion(null);
workflow.setFailedTaskId(null);
workflow.setCreateTime(System.currentTimeMillis());
workflow.setEndTime(0);
workflow.setLastRetriedTime(0);
// Change the status to running
workflow.setStatus(WorkflowModel.Status.RUNNING);
workflow.setOutput(null);
workflow.setExternalOutputPayloadStoragePath(null);
try {View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Set WorkflowDef.restartable=true if completed workflows should be restartable.
- If the workflow is in a non-COMPLETED terminal state, restart is allowed even with restartable=false — terminate/fail it first if appropriate.
- Treat this as a policy decision, not a bug; confirm with the workflow owner before flipping the flag.
Example fix
// before
{ "name": "order", "restartable": false }
// after
{ "name": "order", "restartable": true } Defensive patterns
Strategy: validation
Validate before calling
WorkflowDef def = metadataDAO.getWorkflowDef(name, version).orElseThrow();
WorkflowModel wf = executionDAOFacade.getWorkflowModel(workflowId, true);
if (!def.isRestartable() && wf.getStatus() == WorkflowModel.Status.COMPLETED) {
// restart blocked by policy; either flip the flag or fail it first
throw new IllegalStateException("workflow is non-restartable by policy");
}
workflowExecutor.restart(workflowId, useLatestDefinitions); Try / catch
try {
workflowExecutor.restart(workflowId, useLatestDefinitions);
} catch (NotFoundException e) {
if (e.getMessage().contains("non-restartable")) {
// policy decision: flip restartable=true or fail the workflow first
}
} Prevention
- Set WorkflowDef.restartable=true if completed runs must be restartable.
- Note: non-COMPLETED terminal workflows remain restartable even with restartable=false.
- Treat the flag as an audit-trail policy, confirm before changing it.
When it happens
Trigger: Calling restart on a COMPLETED workflow whose WorkflowDef has restartable=false.
Common situations: A workflow definition intentionally marked non-restartable to protect audit trail of successful runs; trying to restart a completed workflow that the owner configured as non-restartable.
Related errors
- Workflow: %s is not in terminal state, unable to restart.
- No tasks found to be executed
- Workflow is in terminal state. Status = %s
- Task %s not found
- No such workflow found by name: %s, version: %d
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/c70cd32412f0c97b.
Report an issue: GitHub.