Added a method to Task resultset that will help to get pending tasks