@SuppressWarnings("unchecked")
    @VisibleForTesting
    Pair<List<WorkflowTask>, Map<String, Map<String, Object>>> getDynamicForkTasksAndInput(
            WorkflowTask workflowTask, WorkflowModel workflowModel, String dynamicForkTaskParam)
            throws TerminateWorkflowException {

        Map<String, Object> input =
                parametersUtils.getTaskInput(
                        workflowTask.getInputParameters(), workflowModel, null, null);
        Object dynamicForkTasksJson = input.get(dynamicForkTaskParam);
        List<WorkflowTask> dynamicForkWorkflowTasks =
                objectMapper.convertValue(dynamicForkTasksJson, ListOfWorkflowTasks);
        if (dynamicForkWorkflowTasks == null) {
            dynamicForkWorkflowTasks = new ArrayList<>();
        }
        for (WorkflowTask dynamicForkWorkflowTask : dynamicForkWorkflowTasks) {
            if ((dynamicForkWorkflowTask.getTaskDefinition() == null)
                    && StringUtils.isNotBlank(dynamicForkWorkflowTask.getName())) {
                dynamicForkWorkflowTask.setTaskDefinition(
                        metadataDAO.getTaskDef(dynamicForkWorkflowTask.getName()));
            }
        }
        Object dynamicForkTasksInput = input.get(workflowTask.getDynamicForkTasksInputParamName());
        if (!(dynamicForkTasksInput instanceof Map)) {
            throw new TerminateWorkflowException(
                    "Input to the dynamically forked tasks is not a map -> expecting a map of K,V  but found "
                            + dynamicForkTasksInput);
        }
        return new ImmutablePair<>(
                dynamicForkWorkflowTasks, (Map<String, Map<String, Object>>) dynamicForkTasksInput);
    }
This method is used to get the List of dynamic workflow tasks and their input based on the
{@link WorkflowTask#getDynamicForkTasksParam()}

@param workflowTask: The Task of type FORK_JOIN_DYNAMIC that needs to scheduled, which has
    the input parameters
@param workflowModel: The instance of the {@link WorkflowModel} which represents the workflow
    being executed.
@param dynamicForkTaskParam: The key representing the dynamic fork join json payload which is
    available in {@link WorkflowTask#getInputParameters()}
@return a {@link Pair} representing the list of dynamic fork tasks in {@link Pair#getLeft()}
    and the input for the dynamic fork tasks in {@link Pair#getRight()}
@throws TerminateWorkflowException : In case of input parameters of the dynamic fork tasks
    not represented as {@link Map}
core/src/main/java/com/netflix/conductor/core/execution/mapper/ForkJoinDynamicTaskMapper.java