@Override
    public List<TaskModel> getMappedTasks(TaskMapperContext taskMapperContext)
            throws TerminateWorkflowException {
        LOGGER.debug("TaskMapperContext {} in DynamicTaskMapper", taskMapperContext);
        WorkflowTask workflowTask = taskMapperContext.getWorkflowTask();
        Map<String, Object> taskInput = taskMapperContext.getTaskInput();
        WorkflowModel workflowModel = taskMapperContext.getWorkflowModel();
        int retryCount = taskMapperContext.getRetryCount();
        String retriedTaskId = taskMapperContext.getRetryTaskId();

        String taskNameParam = workflowTask.getDynamicTaskNameParam();
        String taskName = getDynamicTaskName(taskInput, taskNameParam);
        workflowTask.setName(taskName);
        TaskDef taskDefinition = getDynamicTaskDefinition(workflowTask);
        workflowTask.setTaskDefinition(taskDefinition);

        Map<String, Object> input =
                parametersUtils.getTaskInput(
                        workflowTask.getInputParameters(),
                        workflowModel,
                        taskDefinition,
                        taskMapperContext.getTaskId());

        // IMPORTANT: The WorkflowTask that is inside TaskMapperContext is changed above
        // createTaskModel() must be called here so the changes are reflected in the created
        // TaskModel
        TaskModel dynamicTask = taskMapperContext.createTaskModel();
        dynamicTask.setStartDelayInSeconds(workflowTask.getStartDelay());
        dynamicTask.setInputData(input);
        dynamicTask.setStatus(TaskModel.Status.SCHEDULED);
        dynamicTask.setRetryCount(retryCount);
        dynamicTask.setCallbackAfterSeconds(workflowTask.getStartDelay());
        dynamicTask.setResponseTimeoutSeconds(taskDefinition.getResponseTimeoutSeconds());
        dynamicTask.setTaskType(taskName);
        dynamicTask.setRetriedTaskId(retriedTaskId);
        dynamicTask.setWorkflowPriority(workflowModel.getPriority());
        return Collections.singletonList(dynamicTask);
    }
This method maps a dynamic task to a {@link TaskModel} based on the input params

@param taskMapperContext: A wrapper class containing the {@link WorkflowTask}, {@link
    WorkflowDef}, {@link WorkflowModel} and a string representation of the TaskId
@return A {@link List} that contains a single {@link TaskModel} with a {@link
    TaskModel.Status#SCHEDULED}
core/src/main/java/com/netflix/conductor/core/execution/mapper/DynamicTaskMapper.java