[rules-users] Temporal operator before[1ms, oo] exhibtis strange behaviour

Wolfgang Laun wolfgang.laun at gmail.com
Thu Nov 4 05:09:09 EDT 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101104/26572f86/attachment.html 


More information about the rules-users mailing list