In developing a custom workflow that will execute numerous work items, it is possible that one or more workitems could fail at any time during their routines and even perhaps raise exceptions.
What is best practice when it comes to handling exceptions raised by workitems inside a workflow manager?
For instance, should the workflow management system simply just log the error and then die outright? Should the workflow manager simply log the exception and carry on with execution of other workitems?
Best Answer
I would say that this is very context dependent.
Surely a failure of step 1 must not be followed by execution of step 2?
Proabably a failure of a few of the price checks shouldn't prevent the overall completion.
I think you will need to enable at least
and
But this gets very tricky. You may need to enable compensation (undoing previous work). For example Book Hotel, try to book flight - fails, hmm not enough just to abort we also need to unbook that hotel.
You may also need to enable