Some answers:
* "do events in stream mode get automatic timestamps ?"
If a class is declared to fulfil an event role like bellow, it will have "automatic timestamps". The timestamp will be based on a class attribute if you declare it so, or it will be based on current time of the session clock otherwise. Session clock can be a realtime clock or a pseudo clock. Check the documentation for details.
declare SomeClass
@role( event )
@timestamp( someAttribute ) // <---- this is optional and causes the engine to use the attribute instead of the session clock as a timestamp reference
end
* do I need to change my Event class like in the broker example (in the way of
Event<stockTick> ) ?
No. The reason for the example to use an Event interface is only because of the Event Generator that I implemented there. The engine itself has no requirements for such kind of interface and don't even care if you do.
* should I for every new event fireallRules ?
Depends on your application architecture and design. You might batch events and fire rules from time to time, or you might run fireUntilHalt() and keep inserting events. Remember there are some threading restrictions though that you must comply to (like max one thread per entry-point, etc).
* What about salience , where can I get documentation about it ?
Drools Fusion leverages all the features from Drools Expert. Check Drools Expert documentation.
Edson
2009/12/16 Khalil Hafsi
<hafsi@fzi.de>
Hi Guys,
I am using last version of fusion.
do events in stream mode get automatic timestamps ? do I need to change
my Event class like in the broker example (in the way of
Event<stockTick> ) ?
class Event{
int symbol;
int load;
}
say if I have a simple code :
..drools initiation.. (stream mode)
session.insert(event(1,10))
session.insert(event(1,20))
session.insert(event(1,30))
should I for every new event fireallRules ?
What about salience , where can I get documentation about it ?
Thank you,
h-
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com