{"record":{"id":"7b70ccd6b2bc50cb","repo":"conductor-oss/conductor","slug":"unable-to-clone-input-params","errorCode":null,"errorMessage":"Unable to clone input params","messagePattern":"Unable to clone input params","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/com/netflix/conductor/core/utils/ParametersUtils.java","lineNumber":185,"sourceCode":"        DocumentContext documentContext = JsonPath.parse(inputMap, option);\n        Map<String, Object> replacedTaskInput = replace(inputParams, documentContext, taskId);\n        if (taskDefinition != null && taskDefinition.getInputTemplate() != null) {\n            // If input for a given key resolves to null, try replacing it with one from\n            // inputTemplate, if it exists.\n            replacedTaskInput.replaceAll(\n                    (key, value) ->\n                            (value == null) ? taskDefinition.getInputTemplate().get(key) : value);\n        }\n        return replacedTaskInput;\n    }\n\n    // deep clone using json - POJO\n    private Map<String, Object> clone(Map<String, Object> inputTemplate) {\n        try {\n            byte[] bytes = objectMapper.writeValueAsBytes(inputTemplate);\n            return objectMapper.readValue(bytes, map);\n        } catch (IOException e) {\n            throw new RuntimeException(\"Unable to clone input params\", e);\n        }\n    }\n\n    public Map<String, Object> replace(Map<String, Object> input, Object json) {\n        Object doc;\n        if (json instanceof String) {\n            doc = JsonPath.parse(json.toString());\n        } else {\n            doc = json;\n        }\n        Configuration option =\n                Configuration.defaultConfiguration().addOptions(Option.SUPPRESS_EXCEPTIONS);\n        DocumentContext documentContext = JsonPath.parse(doc, option);\n        return replace(input, documentContext, null);\n    }\n\n    public Object replace(String paramString) {\n        Configuration option =","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/core/src/main/java/com/netflix/conductor/core/utils/ParametersUtils.java#L167-L203","documentation":"Thrown by ParametersUtils.clone when Jackson ObjectMapper fails to deep-clone a task's input template via JSON round-trip (writeValueAsBytes then readValue). The clone is used to prevent shared mutable references between task instances. An IOException during this process wraps in a generic RuntimeException, indicating the input template contains data that cannot be serialized/deserialized.","triggerScenarios":"A task definition's inputTemplate or the task's resolved input parameters contain objects that Jackson cannot serialize to bytes or deserialize back — e.g. self-referencing objects, types without default constructors, or incompatible nested structures that survive the template merge but break during cloning.","commonSituations":"A workflow definition's inputTemplate contains a deeply nested or circular structure. A ${...} expression resolves to an object type that the ObjectMapper doesn't know how to handle. Custom Jackson modules are misconfigured or missing. Very large templates that hit serialization limits.","solutions":["Inspect the task definition's inputTemplate in the workflow definition JSON for circular references or unsupported nested types.","Simplify the inputTemplate to use only plain JSON-compatible types (String, Number, Boolean, Map, List).","If custom types are needed in templates, register the appropriate Jackson serializers/deserializers.","Check the server log for the underlying IOException cause to identify which field triggers the failure."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate input template is JSON-serializable before workflow registration\ntry {\n    byte[] bytes = objectMapper.writeValueAsBytes(workflowTask.getInputTemplate());\n    objectMapper.readValue(bytes, Map.class);\n} catch (IOException e) {\n    throw new IllegalArgumentException(\n        \"Input template for task '\" + workflowTask.getName() + \"' is not serializable\", e);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only plain JSON types (Map, List, String, Number, Boolean) in input templates.","Avoid circular or deeply nested structures in task input templates.","Test workflow definitions with representative data in integration tests."],"tags":["parameters","serialization","clone","input-template","runtime"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}