Functions tag must be set before rule tags...:)

There's an example:
<java:functions>

public static String regionesNoExpress[] = {"X","XI","XII"};

public static List listadoRegionesNoExpress=new LinkedList(Arrays.asList(regionesNoExpress));

</java:functions>

<rule name="aRule" description="verify">

<parameter identifier="region">

<class>String</class>

</parameter>

<java:condition><![CDATA[ listadoRegionesNoExpress.contains(region)==true ]]></java:condition>

<java:consequence>

<![CDATA[ System.out.println("Contains region: "+region); ]]>

</java:consequence>

</rule>



Rik

----- Original Message ----- From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, January 12, 2006 11:41 AM
Subject: Re: [drools-user] Setting application-data from the .drl file


Hi, thanks for your reply but what do you mean exactly by the fuction
tags?

Caroline




"Ricardo Rojas Aguirre" <[EMAIL PROTECTED]>
12/01/2006 14:51
Please respond to
[email protected]


To
<[email protected]>
cc

Subject
Re: [drools-user] Setting application-data from the .drl file






You can set global variables in the function tag, and use freely in all
your
rules.

Ricardo Rojas

----- Original Message ----- From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, January 12, 2006 5:05 AM
Subject: [drools-user] Setting application-data from the .drl file


Hi,
       I wish to set a global parameter in the drl file but I wish to
initialize it  and set the value in workingMemory from the drl file
itself. Can this be done ?
Thanks

Caroline Grima






Reply via email to