What would be the difference between modifying the state of the object and using drools.modifyObject? I know they're two different steps, but if you change the state of the object, wouldn't you always want to call modifyObject right after that? Or are there times you would do one without the other? I'd be interested to know if this is the case.
Michael Neale <[EMAIL PROTECTED]> wrote: Not off the top of my head (I may be missing something obvious). Do you mean modified as in the state of the object is modified, or modified in terms of drools.modifyObject? PropertyChangeListeners are always are always an option to capture state changes. On 12/30/05, Jonathan Lundquist wrote: > > If there isn't a way to do with with the JSR94 api stateful session, is > there a way with the standard drools interface (rule base, working memory, > etc) to fireAllRules and get just the facts that have changed as a > result? I've mostly only worked with Drools through the JSR94 api so far > and not with the direct Drools objects/interfacts. > > Thanks again! > Jonathan > > ------------- > Is there a way, when using the JSR94 api for Drools and using a > StatefulRuleSession to find only those facts that have changed upon > execution of the executeRules method? I understand, as with all rules > engines, that executing all the rules in the fact base can assert new > facts, retract existing ones, and update existing ones. So the real > question is, can you get just the facts that currently exist in the working > memory that were changed or added by the last executeRules() method call? > > Here is the basic sequence: > (1) load a base set of lots of facts into the fact base > (2) assert a few more facts > (3) executeRules & find which facts changes (& still exist) > (4) assert a few more facts > (5) executeRules & find which facts changes (& still exist) > > I thought that a way to do this might be to use the StatefulRuleSession > 's getObjects() method that takes a parameter. However, > I looked at the drools jsr94 code base (the online cvs repository) and > didn't see any implementation of the ObjectFilter class. Is this the case > -- Object filter is not implemented and not currently supported by drools' > jsr94 implementation? If it is implemented, could someone tell me how to > use it, what its uses are, etc? > > Is there another approach that will let me get just those objects from > the StatefulRuleSession that have changed upon calling executeRules? > > Thanks! > > > > >