private static void buildAggregationTaskWorkflow(Workflow.Builder workflowBuilder, AggregationToolConfig config,
      boolean isRecurrentWorkflow) {
    // create separate job for each type of stats report
    for (String report : config.statsReportsToAggregate) {
      StatsReportType statsType = StatsReportType.valueOf(report);
      String reportName = AmbryStatsReportImpl.convertStatsReportTypeToProperString(statsType)
          + AmbryStatsReportImpl.REPORT_NAME_SUFFIX;
      String jobId =
          statsType.toString().toLowerCase() + (isRecurrentWorkflow ? RECURRENT_JOB_SUFFIX : ONE_TIME_JOB_SUFFIX);
      String taskId = statsType.toString().toLowerCase() + AGGREGATE_TASK_SUFFIX;
      String aggregationCommand = String.format("%s_%s", MySqlReportAggregatorTask.TASK_COMMAND_PREFIX, reportName);
      // build task
      List<TaskConfig> taskConfigs = new ArrayList<>();
      taskConfigs.add(new TaskConfig.Builder().setTaskId(taskId).setCommand(aggregationCommand).build());
      // build job
      JobConfig.Builder jobConfigBuilder = new JobConfig.Builder();
      jobConfigBuilder.addTaskConfigs(taskConfigs);
      jobConfigBuilder.setCommand(aggregationCommand);
      // add job into workflow
      workflowBuilder.addJob(jobId, jobConfigBuilder);
    }
  }
Build the workflow for aggregation tasks.
@param workflowBuilder {@link Workflow.Builder} object.
@param config {@link AggregationToolConfig} object.
@param isRecurrentWorkflow {@code true} is the workflow is recurrent. {@code false} otherwise.
ambry-tools/src/main/java/com/github/ambry/clustermap/HelixTaskWorkflowManagerTool.java