{"action":"created","issue":{"url":"https://api.github.com/repos/j-easy/easy-rules/issues/149","repository_url":"https://api.github.com/repos/j-easy/easy-rules","labels_url":"https://api.github.com/repos/j-easy/easy-rules/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/j-easy/easy-rules/issues/149/comments","events_url":"https://api.github.com/repos/j-easy/easy-rules/issues/149/events","html_url":"https://github.com/j-easy/easy-rules/issues/149","id":315403572,"number":149,"title":"multiple rules of same name are ignored","user":{"login":"yossioz","id":3369092,"avatar_url":"https://avatars0.githubusercontent.com/u/3369092?v=4","gravatar_id":"","url":"https://api.github.com/users/yossioz","html_url":"https://github.com/yossioz","followers_url":"https://api.github.com/users/yossioz/followers","following_url":"https://api.github.com/users/yossioz/following{/other_user}","gists_url":"https://api.github.com/users/yossioz/gists{/gist_id}","starred_url":"https://api.github.com/users/yossioz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yossioz/subscriptions","organizations_url":"https://api.github.com/users/yossioz/orgs","repos_url":"https://api.github.com/users/yossioz/repos","events_url":"https://api.github.com/users/yossioz/events{/privacy}","received_events_url":"https://api.github.com/users/yossioz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-18T09:36:15Z","updated_at":"2018-04-22T07:34:53Z","closed_at":null,"author_association":"NONE","body":"Hi...\r\n\r\nI saw that Rules class use a Set<Rule> hence multiple rules with the same name are ignored and only the first one is executed.\r\n\r\nis there a workaround for this issue ? is there a chance to change Rules class to be an interface and anyone could implements its own Rules container(one can use rules as Set the other can use it as List)\r\n\r\nBR,\r\n"},"comment":{"url":"https://api.github.com/repos/j-easy/easy-rules/issues/comments/383361899","html_url":"https://github.com/j-easy/easy-rules/issues/149#issuecomment-383361899","issue_url":"https://api.github.com/repos/j-easy/easy-rules/issues/149","id":383361899,"user":{"login":"yossioz","id":3369092,"avatar_url":"https://avatars0.githubusercontent.com/u/3369092?v=4","gravatar_id":"","url":"https://api.github.com/users/yossioz","html_url":"https://github.com/yossioz","followers_url":"https://api.github.com/users/yossioz/followers","following_url":"https://api.github.com/users/yossioz/following{/other_user}","gists_url":"https://api.github.com/users/yossioz/gists{/gist_id}","starred_url":"https://api.github.com/users/yossioz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yossioz/subscriptions","organizations_url":"https://api.github.com/users/yossioz/orgs","repos_url":"https://api.github.com/users/yossioz/repos","events_url":"https://api.github.com/users/yossioz/events{/privacy}","received_events_url":"https://api.github.com/users/yossioz/received_events","type":"User","site_admin":false},"created_at":"2018-04-22T07:34:53Z","updated_at":"2018-04-22T07:34:53Z","author_association":"NONE","body":"@jimchou800  how is that related to my question ?\r\nI created a rule (using annotation). \r\n\"Rules\" class is used as a container for a set of rules. \r\nSince the implementation uses a **Set** to store the rules, a rule of the same type/name is ignored.\r\nmy question: can Rules class could be changed to interface, so everyone could create its own implementation for Rules class(one could use Set, while other could use List)\r\n\r\nI will try to explain my problem with the current implementation: \r\nI created an _EqaulRule_ which get as parameter a value to test if it _equals_ to another parameter.\r\nNow i have a use-case when i need to test \"equals\" on more than one value, \r\ne.g: **RuleEquals**(Object.getPrice(), 200) and another rule, **RuleEquals**(Obect.getName(), \"MyName\")\r\n Now since Rules class uses a Set to store the rules(Set make sure ONLY single rule of the same name will be store), only one rule is executed, while i need both rules to be executed."}}
{"actor":{"display_login":"yossioz"}}