Add flowRef to the metadata