Announcement Announcement Module
No announcement yet.
Forcing a step to execute on failure of previous step Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Forcing a step to execute on failure of previous step


    I have the following batch -

    step 1 - read 'tbl_unprocessed_data' and stage to 'batch_staging' table

    step 2 - (multi-thread) invoke business services for each record in 'batch_staging'

    On failure skip current record. Write error message to 'tbl_error'

    step 3 - When all records in 'batch_staging' are processed - Invoke report service

    step 4 - Write to 'tbl_log'

    The behavior we see is that step 3 does not execute on failure of step 2.

    Is there a way on failure of step 2, force execution of steps 3 and 4?
    Last edited by vineetb; May 1st, 2008, 08:08 AM. Reason: more clarity

  • #2
    Why would you want steps 3 and 4 to still run if step 2 failed? Wouldn't that mean you hadn't completely loaded the staging records with all records?


    • #3

      In the steps mentioned above, what needs to be done:

      1. If required to process only the records that were successfully processed in Step 2 and then go ahead with invoking report service for those processed records.

      2. And also write to the tbl_log.



      • #4
        I'm still a little bit confused. If you have configured Step 2 to allow skips, then it can still skip bad records and process only the good ones. You can decide which exceptions should be considered an actual failure of the job.