content: package com.aizuda.snailjob.server.job.task.support.block.workflow;
  
  import com.aizuda.snailjob.common.core.enums.JobBlockStrategyEnum;
  import com.aizuda.snailjob.server.job.task.support.WorkflowTaskConverter;
  import com.aizuda.snailjob.server.job.task.support.generator.batch.WorkflowBatchGenerator;
  import com.aizuda.snailjob.server.job.task.support.generator.batch.WorkflowTaskBatchGeneratorContext;
  import com.aizuda.snailjob.server.job.task.support.handler.WorkflowBatchHandler;
  import lombok.RequiredArgsConstructor;
  import org.springframework.stereotype.Component;
  
  /**
   * @author: shuguang.zhang
   * @date : 2023-12-26
   * @since : 2.6.0
   */
  @Component
  @RequiredArgsConstructor
  public class ConcurrencyWorkflowBlockStrategy extends AbstractWorkflowBlockStrategy {
      private final WorkflowBatchGenerator workflowBatchGenerator;
      private final WorkflowBatchHandler workflowBatchHandler;
  
      @Override
      protected void doBlock(final WorkflowBlockStrategyContext workflowBlockStrategyContext) {
  
  //        try {
  //            workflowBatchHandler.recoveryWorkflowExecutor(workflowBlockStrategyContext.getWorkflowTaskBatchId(), null);
  //        } catch (IOException e) {
  //            throw new SnailJobServerException("Workflow validation failed", e);
  //        }
  
          WorkflowTaskBatchGeneratorContext workflowTaskBatchGeneratorContext = WorkflowTaskConverter.INSTANCE.toWorkflowTaskBatchGeneratorContext(workflowBlockStrategyContext);
          workflowBatchGenerator.generateJobTaskBatch(workflowTaskBatchGeneratorContext);
      }
  
      @Override
      protected JobBlockStrategyEnum blockStrategyEnum() {
          return JobBlockStrategyEnum.CONCURRENCY;
      }
  }
  