changed id to repositoryId in RuleManager