changed flow use query to use IDs instead of descriptors
changed 'where-used-query' for flows