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 <javax.rules.ObjectFilter> 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!