From the course: Spring: Spring Batch

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Building conditional flows

Building conditional flows

From the course: Spring: Spring Batch

Start my 1-month free trial

Building conditional flows

- [Instructor] Within Spring Batch, several out of the box transition elements, allowed jobs to define steps, that are conditionally executed based upon, the previous steps exit status. At a high level, you can think of this as including an if statement, in our batch job that allows us to choose, between several paths the job may take. To help us explore conditional flows, we're going to add another step, within our delivery jobs configuration. This will bring our total number of steps to four. So this step is going to allow us to store the package, in the event that we cannot locate the customer's address. So I'm just going to copy one of our other steps and then I'm going to rename the method, that will create our step being to the storePackageStep. And then we'll need to navigate, into our step builder configuration and change this to the storePackageStep. And then also inside of our tasks GLUT, we'll want to adjust…

Contents