Adding rules for activity.