[rules-users] How to retract events that don't match any rules (without @expires())
Ladd
ladd at codemettle.com
Wed Jul 18 18:19:29 EDT 2012
Davide Sottara wrote
>
> If your rules are dynamic, would you still want to retract a fact not
> matching any of your current rules,
> knowing that a new rule might appear later, which would be activated by
> that fact?
>
That's a good question. Smaller memory footprint by retracting. But we
lose the immediate activation of future rules. Maybe I'll make it an option
and let somebody else decide. ;)
Davide Sottara wrote
>
> For now I would suggest this: whenever you insert an object, you will get
> back a FactHandle.
> Cast it to org.drools.common.InternalFactHandle and look at
> getFirstLeftTuple() and getFirstRightTuple().
> I haven't checked it completely, but I would say that if the fact does
> not participate in any tuple, it
> might be worthy retracting.
>
That's great info!! Worked like a charm.
Once again, thanks guys! You've been extremely helpful.
- Ladd
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-retract-events-that-don-t-match-any-rules-without-expires-tp4018760p4018765.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list