[jboss-jira] [JBoss JIRA] Updated: (JBRULES-859) Switching off alpha node sharing changes rule behaviour

Mark Proctor (JIRA) jira-events at lists.jboss.org
Wed Jul 4 22:08:51 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBRULES-859?page=all ]

Mark Proctor updated JBRULES-859:
---------------------------------

    Fix Version/s:  4.0.0.MR4

edson, please verify this.

> Switching off alpha node sharing changes rule behaviour
> -------------------------------------------------------
>
>                 Key: JBRULES-859
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-859
>             Project: JBoss Rules
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Reteoo
>    Affects Versions: 4.0.0.MR2
>         Environment: Windows XP SP2, Intel x86 Pentium 4  3.0MHz, 1Gb RAM
>            Reporter: Shahad Ahmed
>         Assigned To: Edson Tirelli
>             Fix For:  4.0.0.MR4
>
>
> In release 4.0MR2, switching off alpha node sharing appears to change the results produced by a set of rules.  I'll illustrate the behaviour with the two rules "First" and Second" defined below. Both rules work with a class Customer, which is a simple object with an attribute age. 
>  
> rule "First"
> salience 10
>  when
>   c: Customer(age <= 10)
>  then
>   System.out.println("First - Customer age less than 10");
> end
>  
> rule "Second"
> salience 5
>  when
>      c: Customer(age <= 10)
>  then
>   System.out.println("Second - Customer age less than 10");
> end
>  
>  
> For the default case where alpha node sharing is on, I assert a customer with age 5 and fireAllRules to get the following (hopefully, correct) output:
>  
>   First - Customer age less than 10
>   Second - Customer age less than 10
>  
> However, if I call setShareAlphaNodes(false) in RuleBaseConfiguration to turn off alpha node sharing I get the following output:
>  
>   First - Customer age less than 10
>  
> Alpha node sharing is an optimization and switching it on or off should give the same output for a set of  rules. I've tried switching off alpha node sharing both directly via the API method, and using the system property option, but the behaviour is the same in both cases. 
> Shahad

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list