Hi,
I made two observations related to the aggregation operator.
1) When a rule with the aggregate operator has a label, the rule will not become active.
For example, if I replace 'unlabeled' with 'labela' and 'labelb' in the following example,
there will not be any output from rule 'e()' or 'd()'. The problem occurs also, If there is just one rule at all.
2) The example defines two rules containing aggregate operators. But both aggregations seems to use
the same variable for counting.
The following example outputs 'e(7)', but I would expect an b(2)+(b2)=e(4) at the end.
Example
I define the following rules:
print_trigger(start_aggr/0).
print_trigger(a/1).
print_trigger(d/1).
print_trigger(e/1).
print_event(_/_).
unlabeled 'rule:' d(Countera)<- start seq aggregate(sum(X),a(X),Countera).
unlabeled 'rule:' e(Counterb)<- start seq aggregate(sum(Y),b(Y),Counterb).
If I send following events:
event(start),
event(a(1)),
event(a(2)),
event(b(2)),
event(b(2)),
The output is:
*Event: d(0) @ [datime(2014,2,5,0,46,22,1),datime(2014,2,5,0,46,22,1)]
*Event: a(1) @ [datime(2014,2,5,0,46,22,2),datime(2014,2,5,0,46,22,2)]
*Event: d(1) @ [datime(2014,2,5,0,46,22,1),datime(2014,2,5,0,46,22,2)]
*Event: a(2) @ [datime(2014,2,5,0,46,22,3),datime(2014,2,5,0,46,22,3)]
*Event: d(3) @ [datime(2014,2,5,0,46,22,1),datime(2014,2,5,0,46,22,3)]
*Event: e(5) @ [datime(2014,2,5,0,46,22,1),datime(2014,2,5,0,46,22,4)]
*Event: e(7) @ [datime(2014,2,5,0,46,22,1),datime(2014,2,5,0,46,22,5)]
Except for this problem Jtalis seems to work fine as CEP engine in our project for analysing sensor data streams of solar power plants, which will become OpenSource in some weeks hopefully.
I would be very pleased, if you could give me a hint how to solve this problem.
Cheers
Hendrik