I'm starting using Spring Batch and I would like help how to solve the problem below:
My first job the result of .reader is
PersonA ImageA Priority1
PersonA ImageB Priority2
PersonA ImageC Priority3
In .processor I must process the image and send it to AWS S3. If the process to send ImageA to S3 returns OK, I must not process other images (B and C), but If the process to send ImageA to S3 returns an error, I must process ImageB and if ImageB is neither ok, must process ImageC.
How can I do this if the .processor supposedly executes 1 line at a time ?