{"record":{"id":"ca28eca34a97a94d","repo":"conductor-oss/conductor","slug":"no-dynamic-tasks-could-be-created-for-the-workflow","errorCode":null,"errorMessage":"No dynamic tasks could be created for the Workflow: %s, Dynamic Fork Task: %s","messagePattern":"No dynamic tasks could be created for the Workflow: (.+?), Dynamic Fork Task: (.+?)","errorType":"exception","errorClass":"TerminateWorkflowException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/com/netflix/conductor/core/execution/mapper/ForkJoinDynamicTaskMapper.java","lineNumber":248,"sourceCode":"                                    .map(TaskModel::getReferenceTaskName)\n                                    .filter(\n                                            refTaskName ->\n                                                    refTaskName.equals(\n                                                            dynForkTask.getTaskReferenceName()))\n                                    .findAny();\n\n                    // Construct an informative error message\n                    String terminateMessage =\n                            \"No dynamic tasks could be created for the Workflow: \"\n                                    + workflowModel.toShortString()\n                                    + \", Dynamic Fork Task: \"\n                                    + dynForkTask;\n                    if (existingTaskRefName.isPresent()) {\n                        terminateMessage +=\n                                \" attempted to create a duplicate task reference name: \"\n                                        + existingTaskRefName.get();\n                    }\n                    throw new TerminateWorkflowException(terminateMessage);\n                }\n\n                mappedTasks.addAll(forkedTasks);\n                // Get the last of the dynamic tasks so that the join can be performed once this\n                // task is\n                // done\n                TaskModel last = forkedTasks.get(forkedTasks.size() - 1);\n                joinOnTaskRefs.add(last.getReferenceTaskName());\n            }\n        }\n\n        // From the workflow definition get the next task and make sure that it is a JOIN task.\n        // The dynamic fork tasks need to be followed by a join task\n        WorkflowTask joinWorkflowTask =\n                workflowModel\n                        .getWorkflowDefinition()\n                        .getNextTask(workflowTask.getTaskReferenceName());\n","sourceCodeStart":230,"sourceCodeEnd":266,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/core/src/main/java/com/netflix/conductor/core/execution/mapper/ForkJoinDynamicTaskMapper.java#L230-L266","documentation":"Thrown when getTasksToBeScheduled() for a dynamic fork task returns null or an empty list. This means the decider could not produce any schedulable tasks for the dynamic fork task definition — the task name/type may be invalid, the task definition may not exist in metadata, or a duplicate reference name was detected among existing tasks. The message includes the workflow short string and the dynForkTask, and if a duplicate reference name exists among IN_PROGRESS or terminal tasks, that is appended.","triggerScenarios":"A dynamic fork task references a task name that has no registered TaskDef in metadata. A dynamic fork task's taskReferenceName collides with an existing IN_PROGRESS or terminal task in the same workflow. The task type in the dynamic fork definition is invalid or unregistered.","commonSituations":"Task definition was deleted from metadata after the workflow was designed. Two dynamic fork tasks generate the same taskReferenceName (e.g., deterministic naming from non-unique input keys). The forked task type string has a typo or uses a deprecated name.","solutions":["Register the referenced TaskDef via POST /api/metadata/taskdefs if it does not exist.","Ensure every dynamic fork task has a unique taskReferenceName — avoid collisions with existing tasks.","Check for typos in the task type or name in the dynamic fork input payload.","If using generated reference names, ensure the generation logic produces unique values (include an index or hash)."],"exampleFix":"// before — duplicate ref name collision\n\"forkedTasks\": [\n  { \"name\": \"http_task\", \"taskReferenceName\": \"task_0\" },\n  { \"name\": \"http_task\", \"taskReferenceName\": \"task_0\" }\n]\n\n// after — unique ref names\n\"forkedTasks\": [\n  { \"name\": \"http_task\", \"taskReferenceName\": \"task_0\" },\n  { \"name\": \"http_task\", \"taskReferenceName\": \"task_1\" }\n]","handlingStrategy":"validation","validationCode":"// Verify TaskDefs exist and ref names are unique before fork\nfor (WorkflowTask forkTask : dynForkTasks) {\n    if (metadataDAO.getTaskDef(forkTask.getName()) == null\n            && !systemTaskRegistry.isSystemTask(forkTask.getType())) {\n        throw new IllegalStateException(\"TaskDef not found: \" + forkTask.getName());\n    }\n}\nSet<String> refNames = dynForkTasks.stream()\n    .map(WorkflowTask::getTaskReferenceName)\n    .collect(Collectors.toSet());\nif (refNames.size() != dynForkTasks.size()) {\n    throw new IllegalStateException(\"Duplicate taskReferenceName in dynamic fork\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Register all TaskDefs referenced by dynamic fork tasks before workflow execution.","Generate unique taskReferenceNames for dynamic fork tasks (include an index).","Validate dynamic fork task definitions against metadata before execution."],"tags":["fork-join-dynamic","terminate","task-definition","duplicate-reference"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}