I am checking for self.post_vars and "wf_id" in self.get_vars here-
Because redirection will happen when some action is performed by the user i.e a form is submitted or there is some post vars and "wf_id" in the get vars.
Using self.vars will initiate a redirection loop.