Set Default RuleChainActionType to ERROR_ON_FAILURE
do0ominik opened this issue ยท 5 comments
It would be nice, if I could change the default RuleChainActionType to "ERROR_ON_FAILURE".
Sometimes it happens that I forget to set the RuleChainActionType explizit on the @Rule-Annotation.
This has gone back and forth a bit. Initially, there was no ERROR_ON_FAILURE - a rule failure was treated like an unevaluated rule. That seemed to be the preference for most. However, then a few people said they wanted an option to treat errors in rules differently than unevaluated rules. So, ERROR_ON_FAILURE was introduced.
Since it seems like the common case for many is to treat errors in rules as rules that cannot be evaluated instead of breaking the rule chain on error, I think that's a good default behavior. But if you have a suggestion as to how ERROR_ON_FAILURE functionality could be better specified...
Thanks for your reply.
I would suggest to provide a method like "setDefaultRuleChainActionType(...)".
Currently we did a pre-compile step in order to force a build fail on missing rulechainactiontype specification.
We had a few problems because there was an exception in one of our rules and nobody has noticed because the rule was "ignored/skipped".
We are fine now but I think it would be nice to get a bit more flexible here.
So, when you setup the RuleBookRunner, you can also specify a default rule chain action? I like it. I should be able to get that in within the next couple of weeks.
Thank you! That would be great.
Should be up this week. Gotta do a release on another project tonight/tomorrow and then this is updated next.