Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

(Batch 2.1.3)How to pass one resultset to next step which will create another resultset  RSS feed

Kousik Majumder
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am using Spring Batch 2.1.3.
I have below requirement:-
Step 1:- Read Input data (Output -> ResultSet)
Step 2:- Validate Input data and do some business logic (Output -> Modified ResultSet of 1st step)
Step 3:- Write validated I/P data from second step into database

Now my question is how do I configure this batch so that only the validated inputs go to the 2nd and 3rd step?

For example suppose if in Step 1 I got 10 records and then in second step my custome class will do some validation where these record number may become 5 . So this 5 records will atlast go to database for upgradation. So what I want to know is that how to configure this batch such that 10 records(ResultSet) will be input for my custom class(in 2nd step) and it's output(ResultSet) will be input of 3rd step.

Please suggest.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!