Yes. The same way that the order in SQL statements matter. So always
write more constraining patterns first and you will get huge performance
benefits.
[]s
Edson
2007/7/26, Ronald R. DiFrango <ron.difrango(a)gmail.com>:
All,
I was wondering [and maybe this has be answered before] ,but does the
order of the rules in the when clause matter?
For example I have the following:
rtvHeader : RtvHeader( headerRtvNumber : rtvNumber )
repaymentCode : RepaymentCode( actualCode : code, matchApprv !=
"Y" )
lineCharge : HeaderAdditionalCharge( rtvNumber == headerRtvNumber,
originalRepaymentCode == actualCode )
In my case there is a higher likelihood that I will have more
RepaymentCodes than RtvHeaders [1 of these guys] and likely less
HeaderAdditionalCharge objects. So should the order be more like:
rtvHeader : RtvHeader( headerRtvNumber : rtvNumber )
lineCharge : HeaderAdditionalCharge( rtvNumber == headerRtvNumber,
originalRepaymentCode : originalRepaymentCode)
repaymentCode : RepaymentCode( actualCode ==
originalRepaymentCode, matchApprv != "Y" )
Or does it not really matter?
Thanks in advance,
Ron
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @
www.jboss.com