[rules-users] Timestamp for processing Historical Data
PriyaSha
nash.8103 at gmail.com
Mon Jun 8 09:37:13 EDT 2009
Hi,
I had a chance to go through the fusion sample. I tried the same example
with another logfile as input
Input:
1000 critical Symantec
5000 critical Symantec
6000 critical Symantec
Here I set the timestamp as ( some date in the past + first column of the
input).
*
Following is the simple DRL which has the rule to count number of OMTicket
using sliding window.
package* org.drools.examples.broker;
*
import* org.drools.examples.broker.model.OMTicket;
*
dialect* "mvel"
*
declare* OMTicket
@role( event )
@timestamp (timestamp)
@expires (1h)
*
end*
*
rule* "Count over last 5 seconds"
*
salience* 10
*
no-loop* *true
when
*
Number( $count : intValue ) *from* *accumulate* (
OMTicket($severity:severity) over window:time(5s) *from* entry-point "OM
stream", count() )
*
then*
System.out.println("Number of Critical Tickets over last 5 seconds : " +
$count);
*end*
Here, I just read and insert facts as events with no scheduling.
But the ouput varies for each invocation and it is also not as expected.
Am I missing any configuration here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090608/121af45f/attachment.html
More information about the rules-users
mailing list