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.

Reusing external flows

Reusing external flows

From the course: Spring: Spring Batch

Start my 1-month free trial

Reusing external flows

- [Narrator] When building batch jobs it's common to execute the same sequence of steps or flow within multiple jobs. Spring Batch provides a Flow Builder that allows us to externalize a sequence of steps into a flow that can be reused across different jobs. Let's take a look at how we can apply the concept of an external flow to our deliver package job and our prepare flowers job. Currently within the deliver package job, we have a sequence of steps that deals with taking a particular item and getting it to a customer. I've highlighted those and annotated them with the delivery flow. What we're going to do is externalize this section of our deliver package job and then within our prepare flowers job, we're going to leverage and execute that delivery flow as part of our batch processing. We'll also be able to keep that flow within our deliver package job achieving reusability across both jobs. Let's take a look at how to pull…

Contents