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?
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to