[jboss-jira] [JBoss JIRA] (DROOLS-479) Pseudo Clock doesn't work for 2 not statements

Davide Sottara (JIRA) issues at jboss.org
Fri May 30 09:15:20 EDT 2014


    [ https://issues.jboss.org/browse/DROOLS-479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12971945#comment-12971945 ] 

Davide Sottara edited comment on DROOLS-479 at 5/30/14 9:13 AM:
----------------------------------------------------------------

Please see my comments on the pull request

"The problem is actually a race between the FireThread and the main thread. In Drools 6, the rule is evaluated and enabled when "fire" kicks in for the first time. The rule is then scheduled +3s later as soon as the time advances. In your case, when you advance the pseudo clock.
However, it may be the case that the main thread will advance the clock BEFORE the Fire Thread has activated the rule. If so, the rule will be considered the NEXT time you advance (again) the time. To make this test work, you'll have to make sure that the FireThread is awakened at least once before you move the pseudo clock"


was (Author: dsotty):
Please see my comments on the pull request

> Pseudo Clock doesn't work for 2 not statements
> ----------------------------------------------
>
>                 Key: DROOLS-479
>                 URL: https://issues.jboss.org/browse/DROOLS-479
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 6.0.1.Final, 6.1.0.Beta3
>         Environment: linux 14.04
>            Reporter: Richard Ambridge
>            Assignee: Mark Proctor
>              Labels: pseudoclock
>
> If a rule (event) has the following:
>                 + "when\n"
>                 + "  $s : Cheese(type==\"stinky\")\n"
>                 + "  not( Cheese(type==\"a\", this after [0s,3s] $s ) )\n"
>                 + "  not( Cheese(type==\"b\", this after [0s,5s] $s ) )\n" //2 * not
> and pseudo clock is used, the rule doesn't fire.
> If realtime clock is used, the rule works.



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the jboss-jira mailing list