[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-310) Better handling of primitive and object wrapper comparisons

Edson Tirelli (JIRA) jira-events at jboss.com
Thu Nov 2 16:17:41 EST 2006


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

Edson Tirelli resolved JBRULES-310.
-----------------------------------

    Resolution: Won't Fix
      Assignee: Edson Tirelli  (was: Mark Proctor)

Version 3.1-m1 and above handle primitives nativelly and code works fine. Just rewrite the rule using primitives:

rule "cov and biz income"
    when
      //the coverage amount is >= 15000
      WorkItemWrapper(bizVal:bizIncome) //WorkItemWrapper with isAdmitted being true
      WorkItemWrapper( covAmount == ( bizVal+10000) )

then
   //Log Fired cov and biz income
   System.out.println("fired cov and biz income rule");
  
end

> Better handling of primitive and object wrapper comparisons
> -----------------------------------------------------------
>
>                 Key: JBRULES-310
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-310
>             Project: JBoss Rules
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Leaps, Reteoo
>            Reporter: Joe Son
>         Assigned To: Edson Tirelli
>             Fix For: 3.1-m1
>
>
> I have a following rule set up where both bizIncome and covAmount return Integer object.
> rule "cov and biz income"
>     when
>       //the coverage amount is >= 15000 
>       WorkItemWrapper(bizVal:bizIncome) //WorkItemWrapper with isAdmitted being true
>       WorkItemWrapper( covAmount == ( new Integer(bizVal.intValue()+10000) ))
>   	then
>   	  //Log Fired cov and biz income
>   	  System.out.println("fired cov and biz income rule");
>   	  
> end
> However, the rule doesn't fire even though they are both say 33000.  
> My initial set up is that covAmount and bizIncome both are returned as int primitive.

-- 
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