generateFlow controller