title: How to update status of source data after commit on ItemWriter in Spring Batch
body: <p>I'm using ItemReader with paging to get data from the source table. On ItemProcessor one by one I will send a rest request to a service using the id of the item and pass their responses to the ItemWriter to store in another table.</p>
  <p>At first read (page 1), each item on the chunk have a status of UNPROCESSED, then after processing and saving their responses to another table, I want to update the the status of all items in the current chunk to PROCESSED.</p>
  <p>On ItemReader I'm selecting all items that have UNPROCESSED status.
  select * from table where status = unprocessed</p>
  <p>My question is how can I update the status of each item in my source table that have been processed after saving the response. Because if I update the status, the paging is not correct anymore because of the update. Page 2 will skip some items.</p>