{"record":{"id":"116ee4c2bfcfc558","repo":"conductor-oss/conductor","slug":"task-s-of-workflow-s-can-not-be-serialized-to-js","errorCode":null,"errorMessage":"Task %s of workflow %s can not be serialized to json","messagePattern":"Task (.+?) of workflow (.+?) can not be serialized to json","errorType":"exception","errorClass":"TransientException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/com/netflix/conductor/core/dal/ExecutionDAOFacade.java","lineNumber":392,"sourceCode":"        // Task index removals run before DAO deletion for the same consistency guarantees.\n        workflow.getTasks()\n                .forEach(\n                        task -> {\n                            try {\n                                removeTaskIndex(workflow, task, archiveWorkflow);\n                            } catch (NotFoundException e) {\n                                if (archiveWorkflow) {\n                                    throw e;\n                                }\n                                // Idempotent deletion: missing index records should not block DAO\n                                // removal.\n                                LOGGER.info(\n                                        \"Task {} of workflow {} not found in index during removal, continuing\",\n                                        task.getTaskId(),\n                                        workflowId,\n                                        e);\n                            } catch (JsonProcessingException e) {\n                                throw new TransientException(\n                                        String.format(\n                                                \"Task %s of workflow %s can not be serialized to json\",\n                                                task.getTaskId(), workflow.getWorkflowId()),\n                                        e);\n                            }\n                        });\n\n        // Only remove from the source of truth after index operations succeed.\n        executionDAO.removeWorkflow(workflowId);\n\n        // finally remove from queues\n        workflow.getTasks()\n                .forEach(\n                        task -> {\n                            try {\n                                queueDAO.remove(QueueUtils.getQueueName(task), task.getTaskId());\n                            } catch (Exception e) {\n                                LOGGER.info(","sourceCodeStart":374,"sourceCodeEnd":410,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/core/src/main/java/com/netflix/conductor/core/dal/ExecutionDAOFacade.java#L374-L410","documentation":"Per-task analogue of error 364. While removing a workflow, each task is archived into the index; if objectMapper cannot serialize an individual task, this TransientException is thrown carrying the taskId and workflowId. As with the workflow-level case, index operations happen before DAO removal, so this failure aborts the deletion to preserve data.","triggerScenarios":"A single TaskModel within a terminal workflow contains a payload Jackson cannot serialize (unserializable type, circular reference, missing serializer) when removeTaskIndex runs with archiveTask=true.","commonSituations":"One task stored a runtime object or oversized/unserializable input/output map. Version skew where TaskModel fields changed. Custom task types not registered with the mapper.","solutions":["Inspect the failing task's input/output payload (taskId is in the message) for unserializable content.","Register missing Jackson modules / serializers on the shared ObjectMapper.","Fall back to remove with archiveWorkflow=false to delete the index entry instead of archiving, if preserving that task's raw JSON is not required.","After fixing, retry the workflow removal; the DAO record remains intact."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    executionDAOFacade.removeWorkflow(workflowId, /* archive */ true);\n} catch (TransientException e) {\n    // a task failed to serialize for archival; inspect the task id in the message\n}","preventionTips":["Validate task input/output is serializable at task-creation time when possible.","Avoid storing runtime/heap objects or circular references in task payloads.","Keep Jackson modules consistent between write and archive paths."],"tags":["task","workflow","serialization","archival","index-dao","transient"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}