Steven, Edson:

First of all, thank you very much for answering my question!
I will try the two approaches. I read and tested "eval" and "return value" and seems to work fine! but I'm afraid that I will loose a lot of expression, what do you think about? Is worth of it to use drools this way? The ASM approach looks good cause it's not possible for me to map my data to real beans. I'm eager to integrate drools to my system. Drools is exactly the solution that I need. So, the new question is:

Do you think that in this scenario (dynamic data) would be ok to use drools?

Thank you very very much
Beto


Edson Tirelli wrote:
 Beto,

Unfortunatelly, not with current codebase. We are looking into allowing that in the future, but for now, best thing would be if you can map them to real beans.

There is another option a bit more complex that is dynamic bytecode generation for your beans. It is pretty easy to do, though, if you know ASM or if you get a sample code for bean class generation.

  []s
  Edson

Beto Siless 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





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

   http://xircles.codehaus.org/manage_email

Reply via email to