Validation via JSR 303: Bean Validators
---------------------------------------
Key: JBRULES-2889
URL:
https://issues.jboss.org/browse/JBRULES-2889
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-guvnor
Affects Versions: 5.1.1.FINAL
Reporter: Brad Davis
Assignee: Mark Proctor
Priority: Minor
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/pack...
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.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira