Posts

Showing posts from August, 2020

Parallel Flow - Spring Batch Part 10

There will be cases when you will need to have parallel flows. For instance, in our case, Once the order is placed, we want to start the packaging but also we want to update our Gift Repository. Lets see how it is done. With this understanding, lets create three new steps. checkGiftRepositoryStep  - To check if the repository is short of gifts  orderNewGiftsStep  - Order new gifts giftRepositoryUpdatedStep  - Update repository with new gifts 

Reusability - Spring Batch Part 9

Image
With SpringBatch, you are able to reuse existing steps, jobs. Lets look at how we can reuse existing steps. In our case, when a customer orders a chocolate box, we also want to package it and deliver it. These are the steps we used while the customer ordered a corporate gift as well.  full code available at: https://github.com/ricsr/spring-batch-demo/tree/exercise_09