Announcement Announcement Module
Collapse
No announcement yet.
Run BatchJob for the entire resultset Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Run BatchJob for the entire resultset

    I have a batchjob that takes the input from the database and the output to send an email with the rows from the database.

    The issue that I am getting is for each row it's sending an email.I want the email for the entire resultset not for me.

    Please let me know how can I achieve that.

  • #2
    If your result set isn't too large (probably isn't if you are sending it in an e-mail), you can just write a Tasklet that uses JdbcTemplate directly to process the query and then sne an e-mail at the end.

    Comment


    • #3
      Run BatchJob for the entire resultset

      I am hereby attaching my xml document.

      The issue that I am getting is it's sending an email for each and every row instead of sending the email for the entire list.

      It would be appreciated if I get the response as early as possible.

      Comment


      • #4
        That's what would happen if your Tasklet only processes one row per call to execute(), or if it doesn't return ExitStatus.FINISHED when it is done. So we may need to see the Tasklet not the XML.

        Comment

        Working...
        X