Re: [rules-users] Setting and extracting different values for the same object using rules

2012-07-16 Thread abhinay_agarwal
Thankzz stephen... Your examples proved out to be of great help !!! thanks a TON ! -- View this message in context: http://drools.46999.n3.nabble.com/Setting-and-extracting-different-values-for-the-same-object-using-rules-tp4018660p4018695.html Sent from the Drools: User forum mailing list

Re: [rules-users] Setting and extracting different values for the same object using rules

2012-07-16 Thread Stephen Masters
My pleasure ... I'm glad it was useful to someone! In case you hadn't spotted already, you should just be able to follow the links in github up to the top level project, but here's the link to the top level anyway: https://github.com/gratiartis/scattercode-drools-scenarios It's

Re: [rules-users] Setting and extracting different values for the same object using rules

2012-07-15 Thread abhinay_agarwal
hey Stephen and laune, thanxx for the help !! Stephen..can yu provide me with the whole project..plz ! reagards, Abhinay -- View this message in context: http://drools.46999.n3.nabble.com/Setting-and-extracting-different-values-for-the-same-object-using-rules-tp4018660p4018694.html Sent

[rules-users] Setting and extracting different values for the same object using rules

2012-07-13 Thread abhinay_agarwal
suppose i have an object Customer and i insert the object of customer in the session... class Customer { custID; //getter and setter } Customer customer = new Customer() ksession.insert(customer) now i fire a couple of rules on this object.. and within the rules, the custID is set with three

Re: [rules-users] Setting and extracting different values for the same object using rules

2012-07-13 Thread Stephen Masters
It sounds like you need to create a flavour of the WorkingMemoryEventListener and add it to your session.Your objectUpdated(ObjectUpdatedEvent) method could then compare the event.getFactHandle() to the fact handle you got hold of when you inserted it.SteveOn Jul 13, 2012, at 12:16 PM,

Re: [rules-users] Setting and extracting different values for the same object using rules

2012-07-13 Thread abhinay_agarwal
i cant find any examples of it... can yu give me an example of it !!!??? using WorkingMemoryEventListener on my case..how do i do it ? -- View this message in context:

Re: [rules-users] Setting and extracting different values for the same object using rules

2012-07-13 Thread Wolfgang Laun
See the Expert manual, section 3.3.5. Event Model, which explains all about the various listeners, with code examples. -W On 13/07/2012, abhinay_agarwal abhinay_agar...@infosys.com wrote: i cant find any examples of it... can yu give me an example of it !!!??? using

Re: [rules-users] Setting and extracting different values for the same object using rules

2012-07-13 Thread Wolfgang Laun
This is a curious example. With ID (= identifier) one usually associates a single non-volatile value that's not to be changed. If an object indeed has multiple identifiers (like a person's name, nick name, pen name, alias,...) then custID would have to be a Collection and you can store multiple

Re: [rules-users] Setting and extracting different values for the same object using rules

2012-07-13 Thread Stephen Masters
For a bit of an example, I have an example here, which does filtering for the fact type: https://github.com/gratiartis/scattercode-drools-scenarios/blob/master/src/main/java/uk/co/scattercode/drools/util/TrackingWorkingMemoryEventListener.java And this test shows it in action: