Hi,
I want to delete a list of facts from the working memory and therefore created
following rule:
rule delete rule
agenda-group evaluation
salience 50
no-loop true
when
$facts : ArrayList(size 0) from collect (Fact())
then
logger.info(delete rule, number of facts in list:
In this rule, $facts is bound to a live ArrayList, i.e., a retract
has an immediate effect on the collection. Iterate a copy for
retracting all in a single firing.
That said, it might be better to write a simple rule retracting each
matching Fact individually. Collecting the list and retracting
Betreff: Re: [rules-users] Delete a List of Facts
In this rule, $facts is bound to a live ArrayList, i.e., a retract has an
immediate effect on the collection. Iterate a copy for retracting all in a
single firing.
That said, it might be better to write a simple rule retracting each matching
Fact