[Ask The Community] Creating an Error Handler

I’m glad to start this category “Ask the Community” where I want to write it down all these question you asked me by email or twitter or so on. The idea is to share these questions (without any personal data revelead) ¬†and this way together we can talk about the issue and comment our solutions and improve the one proposed. So, let’s the game begin!

Our first question is about how to create an Error Handler in Business Works, but not a “normal” error handler or any error handler. An error handler with these specifics requirements:

  • You need to provide a retry mechanism when you have an error talking with your DB.
  • You need to provide two different approach to retry:
    • First approach 10 times at 1 minute interval (maybe parametrized)
    • Incremental sleep time approach with no limit and time goes by one minute more than the last one.

Ok, so I’m going to start with my solution but you can collaborate too giving your own or even critize my solution. That’s right too. The idea is we can debate together to achieve the best solution for this concrete problem.

Continue reading