-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can i write dynamic rules to execute rather than writing in java program .like rules defined in JSON or Yaml? #191
Comments
I do not think that this library is planned to use JSON / YAML files to configure the rules. |
I'm not sure that library mentioned above (easy-rules) has something that this library doesn't. Both libraries has examples of dynamically created rules in runtime. Since you can create rules in runtime, you can parse rules from XML, JSON, YAML, database tables or whatever you want and create rules accordingly. The main challenge is to create a flexible rules description format (especially when you plan to create complex rules combined from conditions set joining them using AND, OR, NOT etc), and to create a error-prone parser of this format. All written above is just my opinion, of course ))) |
JSON, XML or YAML support is not on the roadmap. I agree that if that's specifically what you are looking for, then something like easy-rules might be worth a look. I don't really like how that was supported in other frameworks - feels like a move away from simplicity. With that being said, there always were plans to have rules loaded at runtime that could be stored somewhere else, but rules that are in an intuitive DSL, like something that could be provided by Groovy or maybe Kotlin. Not a simple task, tho. |
This thread is scheduled to be deleted on 10/22/2020. Further discussion on externalized rules can be handled in issue #9 |
I liked the rulebook concept which is really great library. but
Do we have any option dynamically add rules and conditions in Yaml or JSON rather than writing all rules in POJO or programmatically?...
The text was updated successfully, but these errors were encountered: