Each fact inserted into working memory will be checked against each rule pattern.
 
Java
 
wm.insert(pto1);
wm.insert(pto2);
 
DRL
 
rule "smurf"
    when
        $p : PersonTO( )
    then
        System.out.println("Property = " + $p.getSomeProperty());
end
 
Output
 
Property = pto1 property
Property = pto2 property
 
 


From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Saleem Lakhani
Sent: 03 April 2008 15:08
To: rules-users@lists.jboss.org
Subject: [rules-users] Simple question

Hi,

 

I am having trouble with accessing two same objects with different data in working memory. When I print the list of working memory I see two objects:

 

Com.model.PersonTO

Com.model.PersonTO

 

But I am not sure how to access each of them individually e.g; Person object exists = person: PersonTO()

 

Please help.

 

Saleem Lakhani