[rules-users] Fusion appears to be working properly, but...

Mauricio Salatino salaboy at gmail.com
Thu Oct 13 18:34:40 EDT 2011


did you call the fire all rules method?

On Thu, Oct 13, 2011 at 7:23 PM, slyfox <bobby.richards at gmail.com> wrote:

> It seems like I have fusion working correctly, yet the rules are not
> firing.
>
> I have a quote object
>
> class Quote {
>    private String symbol;
>    private double bid;
>    private double ask;
>
>   //eclipse generated getters and setter
> }
>
> in my drl I have the following:
> import path.to.quote;
>
> declare entry-point "Incoming Quotes"
>        @doc ("incoming quotes")
> end
>
> declare Quote
>        @role (event)
>        //@expires(2s)
> end
>
> rule "show something"
>        when
>                FXQuote(symbol == "EUR/USD", s:symbol) from entry-point
> "Incoming Quotes"
>        then
>                System.out.println("euro quote");
> end
>
> in my code I am inserting manually:
> quoteStream = ksession.getWorkingMemoryEntryPoint("Incoming Quotes");
> ...
> quoteStream.insert(quote);
>
> I have verified I am getting quote objects with symbol == "EUR/USD" yet the
> rule is not firing
>
>
> I only say that it *appears* that I have the stream set up properly because
> everything compiles and runs and in my log file I see the incoming quotes:
>
> <org.drools.audit.event.ObjectLogEvent>
>  <type>1</type>
>  <factId>6</factId>
>  <objectToString>com.trendfx.fxlib.FXQuote at 103ec0d</objectToString>
> </org.drools.audit.event.ObjectLogEvent>
> <org.drools.audit.event.ObjectLogEvent>
>  <type>3</type>
>  <factId>2</factId>
>  <objectToString>com.trendfx.fxlib.FXQuote at 145f918</objectToString>
> </org.drools.audit.event.ObjectLogEvent>
> <org.drools.audit.event.ObjectLogEvent>
>  <type>3</type>
>  <factId>3</factId>
>  <objectToString>com.trendfx.fxlib.FXQuote at 184843c</objectToString>
> </org.drools.audit.event.ObjectLogEvent>
> <org.drools.audit.event.ObjectLogEvent>
>  <type>3</type>
>  <factId>5</factId>
>  <objectToString>com.trendfx.fxlib.FXQuote at 1912b66</objectToString>
> </org.drools.audit.event.ObjectLogEvent>
>
> etc..
>
> simple rule but no output, tried debugging but since I can only add
> breakpoints to RHS this doesnt really help me
>
> Thanks,
> Bobby
>
>
>
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Fusion-appears-to-be-working-properly-but-tp3420043p3420043.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
 - CTO @ http://www.plugtree.com
 - MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jugargentina.org
 - Co-Founder @ http://www.jbug.com.ar

 - Salatino "Salaboy" Mauricio -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20111013/87f7a6e0/attachment.html 


More information about the rules-users mailing list