usecasing icon indicating copy to clipboard operation
usecasing copied to clipboard

Stop rollback on failure

Open junhanamaki opened this issue 12 years ago • 1 comments

Hi!

To start I want to thank you for this awesome gem :)

Having said that, it would be nice if we had a way to stop the rollback chain after invoking failure. As an example, imagine that we have the following use case chain:

class FinalizeInvoiceUseCase < UseCase::Base depends FinalizeInvoice, SendSms end

And now imagine that we were unable to send a sms on SendSms, and so we invoke failure, and the rollback for FinalizeInvoice and SendSms will be invoked, even though in case of trouble sending a sms we just want to reschedule to send the sms again, and not do a whole roleback to the chain. In this case, it would be nice to be able to stop the rollback order, as to not propagate to the previous use cases.

Thank you for your attention and keep up the good work, BAM!

junhanamaki avatar Jan 08 '14 15:01 junhanamaki

+1 on the stop rollback

AlexMC avatar Jan 08 '14 20:01 AlexMC