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
MVELRuleDefinition should be public #206
Comments
For now I just copy MVELRuleDefinition out and use the copy. |
I think you are referring to an old version of the code. After introducing SpEL support (See #204), the In your case, you can create a custom reader and use it with one of the rule factories ( Is this what you are looking for? |
I'm using 3.2.0 from maven, am I right? |
You are right, 3.2.0 is the current version. You are asking to make The Is that correct? You can already try 3.3.0-SNAPSHOT and see if it works for you. |
Thank you, that's very kind. |
A rule definition is just the static definition of the rule, it does not have a
That's not true, you are still referring to an old version of the code. In v3.3, the method that creates a rule from a Reader is public, not private: https://www.javadoc.io/static/org.jeasy/easy-rules-mvel/3.3.0/org/jeasy/rules/mvel/MVELRuleFactory.html#createRule-java.io.Reader- Here is the code from the v3.3.0 tag: https://github.com/j-easy/easy-rules/blob/easy-rules-3.3.0/easy-rules-mvel/src/main/java/org/jeasy/rules/mvel/MVELRuleFactory.java#L70 That said, you can use any Reader implementation ( |
I'm sorry, is that My language isn't clear enough? |
May I repeat in simple way: |
I didn't make a PR because I haven't read all your codes, I'm not sure what change should be done to fit your whole design of this project (e.g. simply make these 2 method public). |
I wanna create rules directly from some in-memory data (like a Pojo or a Map) instead of a file, so I dig into your sources and I found this:
It's almost exactly what I want, but neither MVELRuleDefinitionReader nor MVELRuleDefinition is Public, so I could not use MVELRuleDefinition.create() to create my Rule.
So if this need is reasonable, please consider:
I think 1 is more flexible so I could use my db as a rule store and provide a web UI to manage my rules, what about you guys?
The text was updated successfully, but these errors were encountered: