{"record":{"id":"8f6044b04009f226","repo":"conductor-oss/conductor","slug":"failed-to-update-workflow-s","errorCode":null,"errorMessage":"Failed to update workflow: %s","messagePattern":"Failed to update workflow: (.+?)","errorType":"exception","errorClass":"TransientException","httpStatus":500,"severity":"error","filePath":"cassandra-persistence/src/main/java/com/netflix/conductor/cassandra/dao/CassandraExecutionDAO.java","lineNumber":456,"sourceCode":"    public String updateWorkflow(WorkflowModel workflow) {\n        try {\n            List<TaskModel> tasks = workflow.getTasks();\n            workflow.setTasks(new LinkedList<>());\n            String payload = toJson(workflow);\n            recordCassandraDaoRequests(\"updateWorkflow\", \"n/a\", workflow.getWorkflowName());\n            recordCassandraDaoPayloadSize(\n                    \"updateWorkflow\", payload.length(), \"n/a\", workflow.getWorkflowName());\n            session.execute(\n                    updateWorkflowStatement.bind(\n                            payload, UUID.fromString(workflow.getWorkflowId())));\n            workflow.setTasks(tasks);\n            return workflow.getWorkflowId();\n        } catch (DriverException e) {\n            Monitors.error(CLASS_NAME, \"updateWorkflow\");\n            String errorMsg =\n                    String.format(\"Failed to update workflow: %s\", workflow.getWorkflowId());\n            LOGGER.error(errorMsg, e);\n            throw new TransientException(errorMsg);\n        }\n    }\n\n    @Override\n    public boolean removeWorkflow(String workflowId) {\n        WorkflowModel workflow = getWorkflow(workflowId, true);\n        boolean removed = false;\n        // TODO: calculate number of shards and iterate\n        if (workflow != null) {\n            try {\n                recordCassandraDaoRequests(\"removeWorkflow\", \"n/a\", workflow.getWorkflowName());\n                ResultSet resultSet =\n                        session.execute(\n                                deleteWorkflowStatement.bind(\n                                        UUID.fromString(workflowId), DEFAULT_SHARD_ID));\n                removed = resultSet.wasApplied();\n            } catch (DriverException e) {\n                Monitors.error(CLASS_NAME, \"removeWorkflow\");","sourceCodeStart":438,"sourceCodeEnd":474,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/cassandra-persistence/src/main/java/com/netflix/conductor/cassandra/dao/CassandraExecutionDAO.java#L438-L474","documentation":"Thrown by CassandraExecutionDAO.updateWorkflow when updating an existing workflow row fails. DriverException during the update (or UUID.fromString on the workflowId) is wrapped in TransientException (cause not attached). Reports the workflowId.","triggerScenarios":"Calling updateWorkflow(WorkflowModel) when Cassandra is unavailable, the workflowId is not a valid UUID, toJson fails, or the write times out.","commonSituations":"Cassandra connectivity loss. Non-UUID workflow ID. Write timeout under high update frequency. Schema drift.","solutions":["Ensure workflow.getWorkflowId() is a valid UUID.","Confirm Cassandra health and retry the update.","Inspect driver logs for the failure subtype.","Preserve the cause when rethrowing for better diagnostics."],"exampleFix":"// before\nthrow new TransientException(errorMsg);\n\n// after\nthrow new TransientException(errorMsg, e);","handlingStrategy":"validation","validationCode":"// Ensure workflow id is a UUID before updateWorkflow\nif (!isUuid(workflow.getWorkflowId()))\n    throw new IllegalArgumentException(\"non-UUID workflow id: \" + workflow.getWorkflowId());","typeGuard":"static boolean isUuid(String s) {\n    try { java.util.UUID.fromString(s); return true; } catch (IllegalArgumentException e) { return false; }\n}","tryCatchPattern":"try {\n    return dao.updateWorkflow(workflow);\n} catch (TransientException e) {\n    log.warn(\"Transient updateWorkflow failure for {}; retrying\", workflow.getWorkflowId());\n    throw e;","preventionTips":["Validate the workflow ID is a UUID before update.","Retry TransientException and check Cassandra connectivity.","Attach the cause (currently dropped) when rethrowing."],"tags":["cassandra","workflow","write","transient","persistence"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}