[rules-users] Best way to write a rule where pattern has multiple constraints
larryc
larry.chambers at sentry.com
Wed Apr 18 12:15:09 EDT 2012
I was reviewing some of our DRLs and noticed some rules written like this:
when
RuleContext(billingSystem == "ABC")
RuleContext(policyStatus == "active")
RuleContext(renewalDueDate != null)
then ...
while others were written this way:
when
RuleContext(billingSystem == "ABC", policyStatus == "active",
renewalDueDate != null)
then ...
There should only be one RuleContext fact in the knowledge base at one time.
Which approach is better? Is one approach more efficient for Drools than
the other? Does it matter?
Thanks!
--
View this message in context: http://drools.46999.n3.nabble.com/Best-way-to-write-a-rule-where-pattern-has-multiple-constraints-tp3920532p3920532.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list