From the course: Spring: Spring Batch
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Solution: Creating a conditional flow
From the course: Spring: Spring Batch
Solution: Creating a conditional flow
(high energy music) - Let's take a look at one way to complete the challenge. In order to solve the challenge, you needed to create two steps. One to thank the customer and one to give them a refund. So I'm going to go ahead and copy our LeaveAtDoorStep and I'll place that step within our class twice. And then I'm going to go ahead and modify it so that we have a refund step. And we'll just need to change the name of our method and then we'll change the console output and then we'll also create our Thank the Customer step. So the refund step will be executed when we have given the customer the incorrect item and the thank the customer step will be executed when we've given them the correct item. And then we'll change the console output here. Okay, so we have our two steps. Now we need to create a new job execution decider, so I'm going to create a new class and I'm going to name that class ReceiptDecider. And that class…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Spring Batch architecture5m 28s
-
Configuring a job repository6m 13s
-
Job parameters6m 59s
-
Building jobs with multiple steps5m 26s
-
Restarting jobs5m 19s
-
Job flow5m 11s
-
Building conditional flows6m 48s
-
Controlling flow with custom statuses6m 59s
-
Challenge: Creating a conditional flow1m 20s
-
Solution: Creating a conditional flow6m 35s
-
-
-
-
-
-
-
-