Thanks Esteban: this is exactly what I was looking for!
--
MM
Esteban wrote
>
> There is a full api that let you instantiate and manipulate declared types
> in Java code:
> http://docs.jboss.org/drools/release/5.4.0.Beta1/drools-expert-docs/html_single/index.html#d0e3750
>
--
View this messa
Ok laune, but I would like to create this objects inside a junit test (so in
a method defined in a *.java file), not from the drl itself. Were you
suggesting a workaround?
--
MM
laune wrote
>
> I've found that creating objects and facts from DRL-declared classes is
> easily done in DRL, in RHS
Hi,
I have declared a fact in a drl file as follows:
package a.b.c
declare MyFact
vehicle : Vehicle
end
The corresponding class file doesn't exists: it is created on the fly by
drools at runtime. The class name should be a.b.c.MyFact, but the
classloader cannot find it by using:
Class c =
I have reduced my problem to a minimal example:
- I use a pseudo clock and stream mode processing
- The events are inserted using a succession of advanceTime(), insert(),
fireAllRules()
- I have three events named: Thief, SwitchOn and SwitchOff
- I have three rules similar to:
rule "det
Hello everybody,
I'm using drools 5.3.0-final to process events in stream mode with a pseudo
clock. I have created an do-nothing rule as follows:
rule "Do nothing"
when
$m : Message( ) from entry-point fromDb
then
end
Then I add a big number of ev
Thank you for your precious help laune. With your explanations everything
works perfectly.
Using the correct sequence of operations and considering that a 1h window
extends from 1h in the past to the future, I have been able to adapt my
rules to make them work.
--
MM
--
View this message in c
laune wrote
>
> I didn't use an event with time stamp 1350. See the times in my
> previous mail; data was taken from your original post.
>
With the data taken from the original post I can reproduce your output.
Setting the timestamps to:
12:10 -> 13:00 -> 13:50 -> 14:00 -> 14:10
It still doesn'
laune wrote
>
> With the rules you gave, in STREAM mode and with a pseudo clock and
> running 5.2.0:
>
> Output:
> SingleEvent TriggerEvent [timestamp=Tue Dec 06 13:00:00 CET 2011]
> Found TriggerEvent [timestamp=Tue Dec 06 13:00:00 CET 2011]
> SingleEvent TriggerEvent [timestamp=Tue Dec 06 14:1
laune wrote
>
> Do you really set the pseudo clock to the values in the timestamps?
> set the clock
> insert the event
> fire all rules
>
Now, if I do:
set the clock
fire all rules
insert the event
i.e., something like this:
nextEventTime = new GregorianCalendar(2011, Calendar.DEC
I have set the session clock type to pseudo, the processing mode is still
stream and I have added the following rule:
rule "SingleEvent"
dialect "mvel"
when
$e0 : TriggerEvent() over window:time(1h) from entry-point
EventStream
then
System.
laune wrote
>
> A virtual ("pseudo") clock is indicated. The timestamp of the facts
> should control the advancement of the clock.
>
When the window is moved, does Drools consider all the intermediate
positions? (Since my rule considers events depending only if they are
included or not in the w
Hi,
The situation is the following: we need to process a stream of delayed
events. This means that the event timestamp is provided for each one
of them and that it doesn't generally correspond to the system time when
we insert them in the entry-point. The events delay may vary, but they
are always
12 matches
Mail list logo