Hi Beto,
 
For your example below you could use:
 
when
    m: Map()
    eval("cheddar".equals(m.get("name")))
 
Steve
 
On 11/8/06, Beto Siless <[EMAIL PROTECTED]> wrote:

Hi all!
I'm new to drools/JBoss rules, the problem is the following:

The system that requires rules, manages dynamic data extracted from a
DB. Each row or data item is stored in a kind of KEY/VALUE map. So I
haven't got hard beans with properties. The question is: Is there a way
to write rules about dynamic properties?

Example:

Map cheese = new HashMap();
m.put("name", "Cheddar");
m.put("price", 10);

Rule "Is cheddar"

when
m:Map(get("name")=="cheddar")
then ...

Thanks in advance!
Beto

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email




--
Steven Williams

Supervising Consultant

Object Consulting
Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501
[EMAIL PROTECTED]
www.objectconsulting.com.au

consulting | development | training | support
our experience makes the difference

Reply via email to