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 ?