Skip to content
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

Add option for SPEL rule execution #6

Open
twicksell opened this issue Apr 12, 2012 · 3 comments
Open

Add option for SPEL rule execution #6

twicksell opened this issue Apr 12, 2012 · 3 comments

Comments

@twicksell
Copy link
Member

Would like to have namespace support for using SPEL as the rule implementation instead of a concrete RuleExecutor.

@cduplichien
Copy link
Member

Since the rule args already accept EL conditionals, you could very quickly make a rule executor implementation that just returns the provided argument. Not as pretty... but recommend this workaround for 0.6.2 and save the namespace updates for the 0.7.0 overhaul.
It'd be like <rule:conditional arg="${some boolean SPEL expression}"/>

@twicksell
Copy link
Member Author

That doesn't seem like it will work for a lot of cases that I'm dealing with. Say I have some class foo which has a property bar. Bar has validation rules of its own, one of which I want to use SPEL for. Now, when I validate foo, and get to the rule on bar, the argument will be evaluated with foo as the root context. Something about that implementation would need to be tweaked in order to make this work. I really want to evaluate expressions on path being validated, not against whatever the root object might happen to be.

@cduplichien
Copy link
Member

Can figure this out following rule consolidation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants