[rules-users] (no subject)

Saleem Lakhani Saleem.Lakhani at citizensfla.com
Thu Mar 20 16:49:53 EDT 2008


Hi,

 

I need to have two objects of the same class present in the working
memory at the same time. Both objects can have other nested objects of
different classes.

The reason is I need to compare data change b/w two objects. E.g;

 

originalObject_A.getPersonTO().getAge() !=
changedObject_A.getPersonTO().getAge()

 

I am using Drools 3.0, DRLs and DSL. 

 

My question is: how do I assert two objects belonging to the same class
in working memory in order to access them both in DSL.

 

E;g 

 

I can do: 

 

workingMemory.assertObject(originalObject_A); //instance of class A


workingMemory.assertObject(changedObject_A); //instance of class A

 

and in DRL I can write: 

 

[when]There is an instance with = originalObject_A:ClassA()

 

how do I get the changedObject_A in dsl. 

 

How does drools know which object I am requesting? I hope my question is
clear. Is it even possible in drools 3.0?

 

Thanks

Saleem Lakhani

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080320/6bc8993f/attachment.html 


More information about the rules-users mailing list