Hi I am new to spring batch .
I have situation with spring batch like below :
I need to run a batch for all Promotions [ List of Promotions]
For Each Promotion I need to prepare dynamic query with promotion attributes and get all the transaction history and compute promotional points to each user
And here the with above dynamic query I wanted to read again from batch as it returns results minimum of 50 thousand records .
below is the process I am expecting, is this is possible in spring batch?
- Read Promotions[Reader reads promotions one by one]
- create query and put it on context
- pass it to the next reader
- reader reads transactions one by one
- process transactions and calculate points
- processor
My problem here is Not able write nested chunks [ one for read promotions and one for reading transactions].
One alternative is :
Partition the job for each Promotion , in this all promotions will run concurrently , But we need to run one after one .
Can any body suggest any way for this ?