Home > Back-end >  Spring batch parallel step
Spring batch parallel step

Time:01-16

Consult everybody, spring batch job, dynamic structure containing parallel step, after the completion of the parallel step execution, complains: No start state was found. You must specify the at further on step in a job. The job status is also a failure,

The code is as follows:
Step step1=createStep (step1 "");
Step step2=createStep (step2 "");

Flow flow1=new FlowBuilder (" flow1 "). The start (step1). The end ();
Flow flow2=new FlowBuilder (" flow2 "). The start (step2). The end ();
Flow [] flowArray={flow1, flow2};

SimpleJobBuilder jobBuilder=new SimpleJobBuilder (new FlowJobBuilder (new jobBuilder (" statJob ")));
Job Job=jobBuilder. Repository (jobRepository) listener (jobExecutionListener). The split (new SimpleAsyncTaskExecutor (jobName)). The add (flowArray.) the end (). The build ();
  • Related