[rules-users] Temporal operator before[1ms, oo] exhibtis strange behaviour
Michael Anstis
michael.anstis at gmail.com
Thu Nov 4 06:51:42 EDT 2010
Hi Wolfgang,
I'd assume your assumption to be correct.
Cloud Mode's definition in the Fusion manual includes:-
"When running in CLOUD mode, the engine sees all facts in the working
memory, does not matter if they are regular facts or events, as a whole" and
"There is no notion of time....There is no requirement on event ordering.
The engine looks at the events as an unnordered cloud against which the
engine tries to match rules"
So "before" has no meaning.
Edson will have to advise how CLOUD mode affects pattern matching and node
propagation though! My assumption, based on your results, is that patterns
including temporal operators are unmatched by default - but probably a
little more to it than that.
With kind regards,
Mike
2010/11/4 Wolfgang Laun <wolfgang.laun at gmail.com>
> In STREAM mode, the clock may have to have advanced beyond the latest fact
> so
> that certain conditions can be evaluated safely.
>
> For instance, another event could still be inserted at the same
> millisecond. If
> a condition such as
> not Event( this coincides $event )
> were evaluated prematurely, it would produce an incorrect result.
>
> Is this the explanation?
> -W
>
>
> On 4 November 2010 10:09, Wolfgang Laun <wolfgang.laun at gmail.com> wrote:
>
>> The .drl:
>>
>> declare Leave
>> @role( event )
>> @timestamp( timestamp )
>> end
>>
>> rule "XXX Leave not !="
>> when
>> $leave: Leave()
>> not Leave( this != $leave )
>> then
>> System.out.println( "XXX only one Leave - not !=" );
>> end
>>
>> rule "YYY Leave not after"
>> when
>> $leave: Leave()
>> not Leave( this before $leave )
>> then
>> System.out.println( "YYY only one Leave - not before" );
>> end
>>
>>
>> A) The pseudo-clock is advanced according to the timestamp; then
>> exactly one event Leave is inserted; then fireAllRules() is called.
>>
>> 1) Running in CLOUD mode, both rules fire.
>> 2) But running in STREAM mode, ONLY rule XXX fires.
>>
>> B) Like A, but the session clock is advanced by (at least) 1ms
>> prior to calling fireAllRules().
>>
>> 3) Either mode, both rules fire.
>>
>> I think that A2) is incorrect; why should passing another msec change the
>> logic?
>>
>> JIRA?
>>
>> Wolfgang
>>
>>
>>
>>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101104/83123eb6/attachment.html
More information about the rules-users
mailing list