[rules-users] Simple question

Anstis, Michael (M.) manstis1 at ford.com
Mon Apr 7 03:36:29 EDT 2008


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 at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Saleem Lakhani
Sent: 03 April 2008 15:08
To: rules-users at 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

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080407/adc076d7/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7206 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20080407/adc076d7/attachment.bin 


More information about the rules-users mailing list