How about writing a simple pre/post processor which finds and replaces string
with what you want - eg converts getValue("type1") to whatever call you would
prefer?
> -----Original Message-----
> From: [email protected] [mailto:rules-users-
> [email protected]] On Behalf Of djb
> Sent: 18 August 2010 12:31
> To: [email protected]
> Subject: [rules-users] Rule template shortcut needed
>
>
> 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.
> _______________________________________________
> rules-users mailing list
> [email protected]
> https://lists.jboss.org/mailman/listinfo/rules-users
**************************************************************************************
This message is confidential and intended only for the addressee. If you have
received this message in error, please immediately notify the
[email protected] and delete it from your system as well as any copies. The
content of e-mails as well as traffic data may be monitored by NDS for
employment and security purposes. To protect the environment please do not
print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX,
United Kingdom. A company registered in England and Wales. Registered no.
3080780. VAT no. GB 603 8808 40-00
**************************************************************************************
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users