Trying to figure out if it can be done in a rule almost some sort of pre rule before other rules are triggered. <br><br>The current rule I have is <br><br>rule &quot;RemoveInvalidEndTimestamps&quot;<br>salience 100<br><br>
when<br><br>$factN : Fact()<br>$factsToRemove : ArrayList(size&gt;=5)<br>                 from collect( Fact(endTime==$factN.endTime))<br>then<br>List newFactsToRemove = new ArrayList();<br>newFactsToRemove.addAll($factsToRemove);<br>
for(Fact n : newFactsToRemove ){<br> retract(n);<br>}<br>end<br><br>I am using a cloud based process . I could sort the facts and stream them in. <br>Just in a few test cases there are many facts with invalid times , which kills the speed . <br>
>From the log I think that each collection of size&gt;=5 , is triggered which means triggered for 5,6,7, etc. <br><br>Just wondering if there is way to say before doing any other rules collect up all these invalid times and remove them. <br>
<br>I was just going to write up a some java code and filter before feeding facts into drools but I find the rule syntax is much easier to read for the non software developers in my group. <br><br clear="all"><br>-- <br>Thanks,<br>
<br>Benjamin Bennett<br><br><a href="mailto:benbennett@gmail.com" target="_blank"></a><br>