{"record":{"id":"3da2370aec9343dd","repo":"conductor-oss/conductor","slug":"subworkflow-status-does-not-conform-to-relevant-ta","errorCode":null,"errorMessage":"Subworkflow status does not conform to relevant task status.","messagePattern":"Subworkflow status does not conform to relevant task status\\.","errorType":"exception","errorClass":"NonTransientException","httpStatus":null,"severity":"critical","filePath":"core/src/main/java/com/netflix/conductor/core/execution/tasks/SubWorkflow.java","lineNumber":352,"sourceCode":"        switch (status) {\n            case RUNNING:\n            case PAUSED:\n                task.setStatus(TaskModel.Status.IN_PROGRESS);\n                break;\n            case COMPLETED:\n                task.setStatus(TaskModel.Status.COMPLETED);\n                break;\n            case FAILED:\n                task.setStatus(TaskModel.Status.FAILED);\n                break;\n            case TERMINATED:\n                task.setStatus(TaskModel.Status.CANCELED);\n                break;\n            case TIMED_OUT:\n                task.setStatus(TaskModel.Status.TIMED_OUT);\n                break;\n            default:\n                throw new NonTransientException(\n                        \"Subworkflow status does not conform to relevant task status.\");\n        }\n\n        if (status.isTerminal()) {\n            if (subworkflow.getExternalOutputPayloadStoragePath() != null) {\n                task.setExternalOutputPayloadStoragePath(\n                        subworkflow.getExternalOutputPayloadStoragePath());\n            } else {\n                task.addOutput(subworkflow.getOutput());\n            }\n            if (!status.isSuccessful()) {\n                task.setReasonForIncompletion(\n                        String.format(\n                                \"Sub workflow %s failure reason: %s\",\n                                subworkflow.toShortString(),\n                                subworkflow.getReasonForIncompletion()));\n            }\n        }","sourceCodeStart":334,"sourceCodeEnd":370,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/core/src/main/java/com/netflix/conductor/core/execution/tasks/SubWorkflow.java#L334-L370","documentation":"Thrown by SubWorkflow.updateTaskStatus in the default branch of a switch on the sub-workflow's WorkflowModel.Status enum. It indicates the sub-workflow terminated in a status that has no mapping to a parent task status. This is a defensive guard against a new or unexpected WorkflowModel.Status value that the switch statement does not handle (RUNNING, PAUSED, COMPLETED, FAILED, TERMINATED, TIMED_OUT are handled).","triggerScenarios":"A sub-workflow reaches a terminal state whose Status enum value is not covered by the switch cases — e.g. a newly added status like SKIPPED or ROLLED_BACK. Also possible if the status field in the datastore is corrupted to an unexpected value.","commonSituations":"Version mismatch between the core module and a persistence module that introduces a new WorkflowModel.Status value. Datastore corruption producing an unexpected status string that deserializes into an enum value not in the switch. Very rare in production with standard Conductor releases.","solutions":["Check the Conductor server version and the persistence module version for compatibility — all modules must use the same WorkflowModel.Status enum set.","Inspect the sub-workflow's actual status in the datastore to identify the unexpected value.","If a custom Status value was added, update SubWorkflow.updateTaskStatus to handle it in the switch statement.","Restart the workflow or manually set the sub-workflow to a known terminal status if the datastore entry is corrupted."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Wrap sub-workflow status mapping in a defensive handler\ntry {\n    subWorkflowTask.execute(workflow, task, executor);\n} catch (NonTransientException e) {\n    if (e.getMessage().contains(\"does not conform\")) {\n        LOGGER.error(\"Unexpected sub-workflow status for task {}\", task.getTaskId(), e);\n        task.setStatus(TaskModel.Status.FAILED);\n        task.setReasonForIncompletion(\"Sub-workflow reached an unmappable status\");\n    } else {\n        throw e;\n    }\n}","preventionTips":["Keep all Conductor modules (core, persistence, server) at the same version to avoid enum mismatches.","If adding a new WorkflowModel.Status value, update SubWorkflow.updateTaskStatus switch to handle it.","Monitor for datastore corruption in workflow status fields."],"tags":["sub-workflow","enum-mismatch","non-transient","version-compatibility"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}