{"record":{"id":"ee39b12030a91d41","repo":"conductor-oss/conductor","slug":"dynamic-tasks-could-not-be-created-the-value-of","errorCode":null,"errorMessage":"Dynamic tasks could not be created. The value of %s from task's input %s has no dynamic tasks to be scheduled","messagePattern":"Dynamic tasks could not be created\\. The value of (.+?) from task's input (.+?) has no dynamic tasks to be scheduled","errorType":"exception","errorClass":"TerminateWorkflowException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/com/netflix/conductor/core/execution/mapper/ForkJoinDynamicTaskMapper.java","lineNumber":569,"sourceCode":"     * @throws TerminateWorkflowException : In case of the {@link WorkflowTask#getInputParameters()}\n     *     does not have a payload that contains the list of the dynamic tasks\n     */\n    @VisibleForTesting\n    Pair<List<WorkflowTask>, Map<String, Map<String, Object>>> getDynamicForkJoinTasksAndInput(\n            WorkflowTask workflowTask, WorkflowModel workflowModel, Map<String, Object> input)\n            throws TerminateWorkflowException {\n        String dynamicForkJoinTaskParam = workflowTask.getDynamicForkJoinTasksParam();\n        Object paramValue = input.get(dynamicForkJoinTaskParam);\n        DynamicForkJoinTaskList dynamicForkJoinTaskList =\n                objectMapper.convertValue(paramValue, DynamicForkJoinTaskList.class);\n\n        if (dynamicForkJoinTaskList == null) {\n            String reason =\n                    String.format(\n                            \"Dynamic tasks could not be created. The value of %s from task's input %s has no dynamic tasks to be scheduled\",\n                            dynamicForkJoinTaskParam, input);\n            LOGGER.error(reason);\n            throw new TerminateWorkflowException(reason);\n        }\n\n        Map<String, Map<String, Object>> dynamicForkJoinTasksInput = new HashMap<>();\n\n        List<WorkflowTask> dynamicForkJoinWorkflowTasks =\n                dynamicForkJoinTaskList.getDynamicTasks().stream()\n                        .peek(\n                                dynamicForkJoinTask ->\n                                        dynamicForkJoinTasksInput.put(\n                                                dynamicForkJoinTask.getReferenceName(),\n                                                dynamicForkJoinTask\n                                                        .getInput())) // TODO create a custom pair\n                        // collector\n                        .map(\n                                dynamicForkJoinTask -> {\n                                    WorkflowTask dynamicForkJoinWorkflowTask = new WorkflowTask();\n                                    dynamicForkJoinWorkflowTask.setTaskReferenceName(\n                                            dynamicForkJoinTask.getReferenceName());","sourceCodeStart":551,"sourceCodeEnd":587,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/core/src/main/java/com/netflix/conductor/core/execution/mapper/ForkJoinDynamicTaskMapper.java#L551-L587","documentation":"Thrown by getDynamicForkJoinTasksAndInput() (the legacy path) when objectMapper.convertValue() produces a null DynamicForkJoinTaskList from the input at the dynamicForkJoinTasksParam key. This means the parameter value was null or could not be converted to a DynamicForkJoinTaskList, so there are no dynamic tasks to fork. Note: convertValue of null input returns null rather than throwing.","triggerScenarios":"The workflowTask.getDynamicForkJoinTasksParam() names a key that is absent from the task input map (resolves to null). The value at that key is present but has a shape that converts to a null DynamicForkJoinTaskList. The dynamicForkJoinTasksParam property on the WorkflowTask is misconfigured or empty.","commonSituations":"An upstream task that should populate the dynamic tasks list failed or produced null output. The parameter name in the workflow definition's dynamicForkJoinTasksParam does not match the key used by the upstream task. The workflow was designed for the newer getDynamicForkTasksAndInput path but uses the legacy param.","solutions":["Ensure the input map contains a non-null value at the dynamicForkJoinTasksParam key.","Verify the dynamicForkJoinTasksParam name matches the key produced by the upstream task.","If the dynamic tasks list may be legitimately empty, handle it upstream (e.g., skip the fork via a preceding SWITCH).","Prefer the newer getDynamicForkTasksAndInput path (using dynamicForkTaskParam and dynamicForkTasksInputParamName) for new workflows."],"exampleFix":"// before — missing param in input\nWorkflowTask wt = new WorkflowTask();\nwt.setDynamicForkJoinTasksParam(\"dynamicTasks\");\n// task input = { \"otherKey\": [...] }  // 'dynamicTasks' not present\n\n// after — ensure upstream populates the key\n// task input = { \"dynamicTasks\": [{ \"taskName\": \"http\", \"referenceName\": \"ht0\", ... }] }","handlingStrategy":"validation","validationCode":"// Ensure dynamicForkJoinTasksParam has a non-null value\nString param = workflowTask.getDynamicForkJoinTasksParam();\nObject paramValue = input.get(param);\nif (paramValue == null) {\n    throw new IllegalStateException(\n        \"Missing dynamic tasks input at key: \" + param);\n}\nDynamicForkJoinTaskList list = objectMapper.convertValue(paramValue,\n    DynamicForkJoinTaskList.class);\nif (list == null || list.getDynamicTasks() == null || list.getDynamicTasks().isEmpty()) {\n    throw new IllegalStateException(\"No dynamic tasks to schedule at key: \" + param);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure the upstream task populates the dynamicForkJoinTasksParam key with a non-null list.","Prefer the newer getDynamicForkTasksAndInput path for new workflows.","Handle empty dynamic task lists upstream with a conditional branch."],"tags":["fork-join-dynamic","legacy","terminate","null-input","dynamic-tasks"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}