How to set and get tags for different rules.