[rules-users] Drools 3.0.6 support for enum's on jdk 1.5 ?

Maxim Veksler maxim.veksler at gmail.com
Wed Aug 13 16:42:10 EDT 2008


Hello list,

I have a rule that generally speaking looks like this :

rule "ABC"
when
    $f : FilteringStateConnector($campaignId : campaignId)


    $campaign : Campaign(code == $campaignId
        ,$limitTypeEnum : limitTypeEnum, $limitByEventType :
limitByEventType)


     // Check Budget limit pass conditions:
    (
        eval(BooleanLogging.trace(log,    "DEBUG: " + ($limitTypeEnum ==
ENUM1.BudgetLimitFlag))) and
        eval(BooleanLogging.trace(log,    "DEBUG: Always here, right now"))
and
        eval(BooleanLogging.trace(log,    "DEBUG: " + ($limitByEventType ==
ENUM2._2_EXPOSED))) and

        Campaign(code == $campaignId, limitTypeEnum ==
ENUM1.BudgetLimitFlag, limitByEventType ==  ENUM2._2_EXPOSED) and

        eval(BooleanLogging.trace(log,    "DEBUG: Right here, right now"))

    ) or (
        ...
    )

then
...
end



The line """        eval(BooleanLogging.trace(log,    "DEBUG: " +
($limitTypeEnum == ENUM1.BudgetLimitFlag))) """ evaluates to "true" in the
logs.
The line """        eval(BooleanLogging.trace(log,    "DEBUG: " +
($limitByEventType == ENUM2._2_EXPOSED))) """ as well. These are java (eval)
checks for truth. If I try to use Drools to gain the rete optimization by
writing :
"""        Campaign(code == $campaignId, limitTypeEnum ==
ENUM1.BudgetLimitFlag, limitByEventType ==  ENUM2._2_EXPOSED)  """, It never
reachers past that line. why is that? Can't Drools 3 check for truthness of
Enum conditionals ?


I would love to supply more information if required.



Help is highly appreciated,
Maxim.

-- 
Cheers,
Maxim Veksler

"Free as in Freedom" - Do u GNU ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080813/c1e6a0d5/attachment.html 


More information about the rules-users mailing list