Function getFlow