[rules-users] Accumulate + Temporal Operators

Paul R. reverselogic at gmail.com
Thu Jan 14 14:56:31 EST 2010


Hi,

I'm using accumulate with sliding windows to verify that certain event
conditions are present for a specified period of time, which works fine,
however
I need to verify that both conditions are present at the same time, i.e
Foo.value > 1 for 10 seconds and Bar.value < 1 for 10 seconds. There doesn't
appear to be an obvious way to use the temporal operators in this situation.
Can anybody offer any suggestions?

    rule test no-loop true
    when
        $f : Double(doubleValue > 1.0) from accumulate( Foo($v : value) over
window:time ( 10s )
            from entry-point EntryPoint, min($v))
        $b : Double(doubleValue < 1.0) from accumulate( Bar($v : value) over
window:time ( 10s )
            from entry-point EntryPoint, max($v))
    then
        // ...
    end

Any help greatly appreciated.

Thanks,

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100114/eb2f0700/attachment.html 


More information about the rules-users mailing list