http://jira.jboss.com/jira/browse/JBRULES-565

Here it goes.

If something needs to be added or changed on this, let me know. 

-----Original Message-----
From: Mark Proctor [mailto:[EMAIL PROTECTED] 
Sent: domingo, 19 de novembro de 2006 16:51
To: [email protected]
Subject: Re: [drools-user] Drools - BUG

Marcos,

Can you open a jira for this and we'll tackle it asap.

Mark
Marcos Tengelmann wrote:
> Hi,
>
> I Downloaded and built the trunk (2006/Nov/19) of drools and run a 
> very big comparision with current stable version.
> I got VERY different results from trunk and the stable.
>
> Before going to the bug itself , I would like to put some info on "How-to"
> go from current stable version to the new Drools version.
>
> I Had to change some classes of my Object Model, with basically these 
> two type of changes.
> 1-All bound variabls that binds to primitive type has to be changed. 
> Example:
> when
>       ReceiptItem ($amount : totalAmount > 20) Then
>       System.out.println($var.doubleValue()) #Current Version Way
>
>       System.out.println($var) #Current Trunk Way
>
> 2-Due to proxy classes being created:
>       A-All used classes in WHEN side (At least), MUST have a public no
arg 
> constructor
>       B-This constructor CANNOT have any call to public methods of this 
> class.
> Example:
>       # Does not WORK
>       public class ReceiptItem {
>               private ReceiptItem() {
>               }
>       }
>       # Does not WORK
>       public class ReceiptItem {
>               public ReceiptItem(String itemName) {
>               }
>       }
>       # Does not WORK
>       public class ReceiptItem {
>               public ReceiptItem(double amount) {
>                       this.setAmount(amount);
>               }
>               public void setAmount(double amount) {
>                       this.amount = amount;
>               }
>       }
>       # WORKS
>       public class ReceiptItem {
>               public ReceiptItem(double amount) {
>                       this.amount = amount;
>               }
>       }
>
>
> Well, just to give some clue to the ones that are trying to migrate or 
> will do in the future....
>
> Let's move to the bug....
> This classes
> Public Class Account {
>       public String getAccountState() {...} } Public Class Receipt {
>       public String getReceiptState() {...} }
>
> RULE "DIFFERENT STATES"
> When
>       Account($aState : accountState)
>       Receipt($rState : receiptState != $aState) Then
>       System.out.println("AccountState:[" + $aState + "]");
>       System.out.println("ReceiptState:[" + $rState + "]"); End
>
> The results are:
> AccountState:[SP]
> ReceiptState:[SP]
> AccountState:[RJ]
> ReceiptState:[RJ]
> ....and so on...
>
> This means the receiptState != $aState is NOT working as expected.
>
> Additionally if I try with receiptState == $aState, the results are 
> exactly the same for receiptState != $aState.
> Which makes me suspect of some problems in Node Sharing not taking the 
> operator into consideration.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
> --
> This email has been verified as Virus free Virus Protection and more 
> available at http://www.plus.net
>
>   


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to