[rules-users] Validation flow - defer expression evaluation

peters peter.symoens at codeworks.be
Mon Oct 24 08:02:16 EDT 2011


Hi,

I was wondering which is the proper way to do sanity checks (not null
etc...) on a fact  before starting the actual business rules.
I have created a a ruleflow with a validation node (VALRFG) and a business
rule node (BRRFG) to determine execution order.
If in the validation node a not null constraint is violated, the session is
aborted (drools.halt()).
Problem with this approach is that assertions defined in rules of the
ruleflow-group "BRRFG" are validated before the validation rules execute. 
The engine throws exception  at
org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:298)
	at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130).
...
at
org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:101)
	at
org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:291)

How can I make sure that the validation rules are executed before the mvel
expressions in the business rules are being evaluated? 


Thanks for feedback,


--
View this message in context: http://drools.46999.n3.nabble.com/Validation-flow-defer-expression-evaluation-tp3447883p3447883.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list