Chris,

   Fusion is an extension of Drools Expert. Think about it as all Expert features + some additional features. That is why Drools Fusion docs is just a list of features explained.

   I assume you looked here already:

http://www.jboss.org/drools/documentation.html

   For both, expert and fusion docs.

   So, back to your rule, syntax seems correct to me. Why do you say it is not working? What error or symptoms do you see?

   []s
   Edson

2009/5/26 Chris Richmond <crichmond@referentia.com>

Hello,

 

I am trying to write a rule for a moving average over values over the last minute using fusion.  In general I can’t seem to locate a detailed resource for authoring syntax for these types of rules or rules in general, but specifically, I tried to modify something from the fusion documentation for my purposes using the StockTicker fusion sample.  Here is the rule entry I aded to the broker.drl:

 

rule "Alert when moving average goes below 50"

when

    Number( doubleValue > 127 ) from accumulate(

        StockTick( symbol == "ORCL", $price: price ) over window:time( 1m ),

        average( $price ) )

then

    System.out.println("moving average has gone beyone moving average");

End

 

I basically want to be alerted any time the moving average for ORCL moves above 127 (or whatever criteria I set…I picked that based on the sample data the sample fusion project uses), but it doesn’t seem to be working. 

 

I guess if I could locate the definitave samples or guide for authoring these types of rules I could use that, but it’s very difficult to piece together how to author rules utilizing fusion features based on isolated snippets from the fusion guide.

 

Can anyone point me to some reasources for learning rule authoring, especially for taking advantage of the fusion features.

 

Thanks,


Chris


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of Red Hat @ www.jboss.com