[rules-users] Rule template shortcut needed
djb
dbrownell83 at hotmail.com
Wed Aug 18 07:31:27 EDT 2010
Hi there,
My question is related to the ability to remove criterion in a rule template
by a cunning commenting trick so that if the variable @{VAR} is blank, the
line will be blank. Wolfgang wrote the code, I believe.
I've got a situation where I've got DB rows where i've got:
TYPE | CODE | TYPE2 | CODE2_FROM | CODE2_TO
there are 17 types. So it lets us have rules like
Type U code 123 cannot be charged with Type V codes 234 to 236.
I need the rules to compare the correct property, but I don't want to lose
the advantage of the RETE algorithm by using a getValue("type1") function.
I see one solution:
2. Make a template with 17 + 17 + 17 = 51 columns, where each one uses the
// @{VAR} trick.
Is there a better way? Or, should I just do getValue("type")?
Thanks
Daniel
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Rule-template-shortcut-needed-tp1203969p1203969.html
Sent from the Drools - User mailing list archive at Nabble.com.
More information about the rules-users
mailing list