Results 1 to 4 of 4

Thread: Forcing a step to execute on failure of previous step

  1. #1
    Join Date
    Feb 2008
    Location
    Boston
    Posts
    9

    Question Forcing a step to execute on failure of previous step

    Hi,

    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 at 08:08 AM. Reason: more clarity

  2. #2
    Join Date
    Dec 2006
    Posts
    1,061

    Default

    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. #3
    Join Date
    May 2008
    Location
    USA
    Posts
    4

    Default

    Hi,

    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.

    Thanks!

  4. #4
    Join Date
    Dec 2006
    Posts
    1,061

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •