Here is the work flow with a word of caution. This workflow may not suit for all the situations, you should use this as a starting point. As I mentioned & demonstrated during my presentation, you should take into account other key parameters (like memory usage, exceptions present in heap etc) as well.
Error: Twitter did not respond. Please wait a few minutes and refresh this page.