-
Bug
-
Resolution: Won't Do
-
Critical
-
None
-
6.5.0.Final
-
Compatibility/Configuration, User Experience
-
NEW
-
NEW
-
Prog_G
Here the sample code of my window rule :
rule "Sliding window test1"
agenda-group "g0"
when
exists Fact( (facts["parameter2"] ) != null && facts["source"] == "A0") && $number: Number() from accumulate(Fact(facts["parameter2"] != null && $t : Double.valueOf(facts["parameter2"]) && facts["source"] == "A0") over window:time(2m) , sum($t))
then
globalList.add("2 Minute Sum of parameter2 of Source A0 is " + $number );
end
rule "Sliding window test2"
agenda-group "g0"
when
exists Fact( (facts["parameter2"] ) != null && facts["source"] == "A1") && $number: Number() from accumulate(Fact(facts["parameter2"] != null && $t : Double.valueOf(facts["parameter2"]) && facts["source"] == "A1") over window:time(2m) , sum($t))
then
globalList.add("2 Minute Sum of parameter2 of Source A1 is " + $number );
end
I am sending request from 2 different sources. I am getting response as 0.0 after some time. I check the values in the working memory by using collect as List for the parameter values. I have found that the previous values got deleted when the response is 0.0. I need immediate help.
Some important info:
Fact is the class Object and it has a Hashmap(facts) as class variable. The factmap contains the variable name as key and its value as variable value.