add functionality to stop a queue when exception is thrown by a step

Currently we can set queues to stop on failure if they encounter an error. If a process encounters an exception it is not viewed by the queue/sql job as an error and the queue continues to the next step. We would like to add an option to stop sub steps from running if a primary step encounters an exception.

  • Lewis Cole
  • May 5 2022
  • Reviewed: Voting Open
Organization Name (Please enter full organization name) blackbaud
Reported Version 4.0
  • Attach files
  • David Wanless commented
    May 05, 2022 23:40

    Alternatively, we could add a third option to 'On failure', of 'End queue on exception or failure'.

  • David Wanless commented
    May 05, 2022 23:38

    As an example, we have a Queue to handle our receipts. It has various Steps, each of which are themselves are Queues. Let's call them subqueues. The Steps in the main Queue and the scores of Steps in the subqueues have 'On failure' set to 'End queue', because we don't want processing to continue if there's been an error somewhere, as it could have very messy results for us and our supporters, e.g., we could send receipts twice or miss sending receipts. If one of the Steps in a subqueue fails, that subqueue stops, as expected and desired. However, the parent Queue then continues with its next Step, because the subqueue "completed with an exception", rather than "failing". This is highly undesirable. Please give us a method of ensuring that once a Step fails somewhere in this hierarchy, there is no further processing. Perhaps we could have a setting in a Queue which indicated whether a failure in a Step should cause the whole Queue to "fail". At the moment the only way we seem to be able to achieve this is to abandon the use of subqueues, and put all 78 Steps into one massive Queue, then duplicate many of them into another Queue which uses many of the same subqueues. This would make it harder to maintain and troubleshoot the Queues, and much harder to pick up the pieces when there is a problem, rather than being able to just rerun the relevant subqueues.