conductor-oss/conductor · error · TerminateWorkflowException
Input '%s' is invalid. Cannot deserialize a list of Workflow
Error message
Input '%s' is invalid. Cannot deserialize a list of Workflow Tasks from '%s'
What it means
Thrown by getDynamicForkWorkflowTasks() when ObjectMapper.convertValue() fails to deserialize the input JSON into a List<WorkflowTask>. This happens when the input at the dynamicForkTaskParam key is not valid WorkflowTask JSON — wrong structure, missing fields, or a completely wrong type. The catch also covers the case where a deserialized task has a null taskReferenceName (the inner RuntimeException is caught by the same catch block).
Source
Thrown at core/src/main/java/com/netflix/conductor/core/execution/mapper/ForkJoinDynamicTaskMapper.java:409
dynamicForkWorkflowTasks, (Map<String, Map<String, Object>>) dynamicForkTasksInput);
}
private List<WorkflowTask> getDynamicForkWorkflowTasks(
String dynamicForkTaskParam, Map<String, Object> input) {
Object dynamicForkTasksJson = input.get(dynamicForkTaskParam);
try {
List<WorkflowTask> tasks =
objectMapper.convertValue(dynamicForkTasksJson, ListOfWorkflowTasks);
for (var task : tasks) {
if (task.getTaskReferenceName() == null) {
throw new RuntimeException(
"One of the tasks had a null/missing taskReferenceName");
}
}
return tasks;
} catch (Exception e) {
LOGGER.warn("IllegalArgumentException in getDynamicForkTasksAndInput", e);
throw new TerminateWorkflowException(
String.format(
"Input '%s' is invalid. Cannot deserialize a list of Workflow Tasks from '%s'",
dynamicForkTaskParam, dynamicForkTasksJson));
}
}
Pair<List<WorkflowTask>, Map<String, Map<String, Object>>> getDynamicTasksSimple(
WorkflowTask workflowTask,
Map<String, Object> input,
String parentTaskName,
boolean hasMoreThanOneFork)
throws TerminateWorkflowException {
String forkSubWorkflowName = (String) input.get("forkTaskWorkflow");
String forkSubWorkflowVersionStr = (String) input.get("forkTaskWorkflowVersion");
Integer forkSubWorkflowVersion = null;
try {
forkSubWorkflowVersion = Integer.parseInt(forkSubWorkflowVersionStr);View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Inspect the dynamicForkTasksJson value in the error message — it shows exactly what failed to deserialize.
- Ensure each element in the forked tasks array has at minimum: name, taskReferenceName, and type.
- Validate the JSON structure against the WorkflowTask schema before providing it as fork task input.
- If a task has a null taskReferenceName, add an explicit non-empty reference name to every forked task.
Example fix
// before — missing taskReferenceName
"forkedTasks": [
{ "name": "http_task", "type": "SIMPLE" }
]
// after
"forkedTasks": [
{ "name": "http_task", "taskReferenceName": "http_0", "type": "SIMPLE" }
] Defensive patterns
Strategy: validation
Validate before calling
// Validate forked tasks JSON can be deserialized before execution
Object forkTasksJson = input.get(dynamicForkTaskParam);
try {
List<WorkflowTask> tasks = objectMapper.convertValue(forkTasksJson,
new TypeReference<List<WorkflowTask>>() {});
for (WorkflowTask t : tasks) {
if (t.getTaskReferenceName() == null) {
throw new IllegalArgumentException("Missing taskReferenceName");
}
}
} catch (Exception e) {
throw new IllegalArgumentException("Invalid fork tasks JSON: " + e.getMessage());
} Prevention
- Validate the dynamic fork tasks JSON against the WorkflowTask schema.
- Ensure every forked task has a non-null taskReferenceName.
- Use JSON schema validation on workflow input before execution.
When it happens
Trigger: The dynamic fork tasks JSON contains objects that cannot be mapped to WorkflowTask (missing required fields like name or type). The JSON is a single object instead of an array. One of the forked tasks has a null or missing taskReferenceName field.
Common situations: Workflow designer provides inline JSON for forked tasks with a typo in a field name (e.g., 'taskReference' instead of 'taskReferenceName'). The dynamic fork task list is empty or contains a string instead of a task object. A field that should be a string is provided as a number.
Related errors
- Tasks could not be dynamically forked due to invalid input:
- No dynamic tasks could be created for the Workflow: %s, Dyna
- Dynamic join definition is not followed by a join task. Che
- Input to the dynamically forked tasks is not a map -> expect
- Dynamic tasks could not be created. The value of %s from tas
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/afc29137feacfd3d.
Report an issue: GitHub.