-
New Feature
-
Resolution: Obsolete
-
Minor
-
None
-
None
-
None
In order to allow for business users to more easily validate rules, I wanted to propose using Bean Validation (JSR 303) for Validation of values getting set into the fact model. Currently in Drools, the only validation that is presented is via DSL validation.
Using Validators would give us many validations out of the box. They are also part of Java 6, within the package:
javax.validation.constraints
http://download.oracle.com/javaee/6/api/javax/validation/constraints/package-summary.html
Additionally, we should migrate the Enumeration concept to use the Bean Validation package as well, creating a Validator for enumerated values, since the enumeration concept in Drools really is just a constraint on a string.
The nice thing about this approach is that we allow the developers to create very strict rules around the content entry, which then allows the business to more easily own the rules without "breaking" the underlying code associated with the rules execution.
The Guvnor interface should then validate these rules in the BRL and Decision Table rule entry screens.