{"action":"created","issue":{"url":"https://api.github.com/repos/EasyRules/easyrules/issues/13","repository_url":"https://api.github.com/repos/EasyRules/easyrules","labels_url":"https://api.github.com/repos/EasyRules/easyrules/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/EasyRules/easyrules/issues/13/comments","events_url":"https://api.github.com/repos/EasyRules/easyrules/issues/13/events","html_url":"https://github.com/EasyRules/easyrules/issues/13","id":78829740,"number":13,"title":"Problem with executing all the rules in the easy-rules-2.0.0","user":{"login":"vinoct6","id":675380,"avatar_url":"https://avatars.githubusercontent.com/u/675380?v=3","gravatar_id":"","url":"https://api.github.com/users/vinoct6","html_url":"https://github.com/vinoct6","followers_url":"https://api.github.com/users/vinoct6/followers","following_url":"https://api.github.com/users/vinoct6/following{/other_user}","gists_url":"https://api.github.com/users/vinoct6/gists{/gist_id}","starred_url":"https://api.github.com/users/vinoct6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinoct6/subscriptions","organizations_url":"https://api.github.com/users/vinoct6/orgs","repos_url":"https://api.github.com/users/vinoct6/repos","events_url":"https://api.github.com/users/vinoct6/events{/privacy}","received_events_url":"https://api.github.com/users/vinoct6/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/EasyRules/easyrules/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2015-05-21T04:49:53Z","updated_at":"2016-09-06T09:44:02Z","closed_at":"2015-05-21T07:44:57Z","body":"I tried out the new version 2.0.0. All the registered rules does not seem to be triggered.\r\n I'm pasting the code I have written, and I'm expecting all the rules to be executed, but it's not working this way. Let me know if I'm missing something.\r\n\r\n```java\r\n  @Rule\r\n  public class RuleA {\r\n\t@Condition\r\n\tpublic boolean when(){\r\n\t\tSystem.out.println(\"A is called\");\r\n\t\treturn true;\r\n\t}\r\n\t@Action\r\n\tpublic void then(){\r\n\t\tSystem.out.println(\"A is executed\");\r\n\t}\r\n}\r\n```\r\n\r\n```java\r\n@Rule\r\npublic class RuleB {\r\n\t@Condition\r\n\tpublic boolean when(){\r\n\t\tSystem.out.println(\"B is called\");\r\n\t\treturn true;\r\n\t}\r\n\t\r\n\t@Action\r\n\tpublic void then(){\r\n\t\tSystem.out.println(\"B is executed\");\r\n\t}\r\n}\r\n```\r\n```java\r\n@Rule\r\npublic class RuleC {\r\n\t@Condition\r\n\tpublic boolean when(){\r\n\t\tSystem.out.println(\"C is called\");\r\n\t\treturn true;\r\n\t}\r\n\t\r\n\t@Action\r\n\tpublic void then(){\r\n\t\tSystem.out.println(\"C is executed\");\r\n\t}\r\n}\r\n```\r\n\r\nThe Main method for calling these rules:\r\n\r\n```java\r\npublic class Main {\r\n\tpublic static void main(String[] args) {\r\n\t\t  RuleA a = new RuleA();\r\n\t\t  RuleB b = new RuleB();\r\n\t\t  RuleC c = new RuleC();\r\n\t     \r\n           RulesEngine rulesEngine = RulesEngineBuilder.aNewRulesEngine().build();\r\n\t      rulesEngine.registerRule(a);\r\n\t      rulesEngine.registerRule(b);\r\n\t      rulesEngine.registerRule(c);\r\n\t     \r\n             rulesEngine.fireRules();\r\n\t}\r\n}\r\n```\r\n\r\n\r\n**Output printed in the console-------------------**\r\n\r\nMay 21, 2015 10:18:26 AM org.easyrules.core.DefaultRulesEngine logEngineParameters\r\nINFO: Rule priority threshold: 2,147,483,647\r\nMay 21, 2015 10:18:26 AM org.easyrules.core.DefaultRulesEngine logEngineParameters\r\nINFO: Skip on first applied rule: false\r\nMay 21, 2015 10:18:26 AM org.easyrules.core.DefaultRulesEngine logEngineParameters\r\nINFO: Skip on first failed rule: false\r\nMay 21, 2015 10:18:26 AM org.easyrules.core.DefaultRulesEngine applyRules\r\nINFO: Rule 'rule' triggered.\r\nA is called\r\nA is executed\r\nMay 21, 2015 10:18:26 AM org.easyrules.core.DefaultRulesEngine applyRules\r\nINFO: Rule 'rule' performed successfully.\r\n\r\n\r\n__Question:__\r\n\r\nWhy aren't RuleB and RuleC executed in this case ?\r\n"},"comment":{"url":"https://api.github.com/repos/EasyRules/easyrules/issues/comments/244901789","html_url":"https://github.com/EasyRules/easyrules/issues/13#issuecomment-244901789","issue_url":"https://api.github.com/repos/EasyRules/easyrules/issues/13","id":244901789,"user":{"login":"benas","id":1210553,"avatar_url":"https://avatars.githubusercontent.com/u/1210553?v=3","gravatar_id":"","url":"https://api.github.com/users/benas","html_url":"https://github.com/benas","followers_url":"https://api.github.com/users/benas/followers","following_url":"https://api.github.com/users/benas/following{/other_user}","gists_url":"https://api.github.com/users/benas/gists{/gist_id}","starred_url":"https://api.github.com/users/benas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benas/subscriptions","organizations_url":"https://api.github.com/users/benas/orgs","repos_url":"https://api.github.com/users/benas/repos","events_url":"https://api.github.com/users/benas/events{/privacy}","received_events_url":"https://api.github.com/users/benas/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T09:44:02Z","updated_at":"2016-09-06T09:44:02Z","body":"Don't use exceptions for flow control. If you can't design your requirement as a set of ordered rules (IF/THEN (with no else) statements), don't use a production system."}}
{"actor":{"display_login":"benas"}}