----- Original Message -----From: mmquelo@gmail.comNewsgroups: gmane.comp.java.drools.userSent: Saturday, February 16, 2008 11:40 PMSubject: You must see this,guys...new bug? defining rules saturday night made me mad?Look at this....I have got a "ContractWrapper" fact inserted into WM.It wraps a "Contract" object and some "enums" fields.One of these fields is "upronto":public
class ContractWrapper extends BaseOmPersistentWithAssignedId{Contract
mycontract=null;...
Pronto upronto = null;...
<getters and setters....>
...
}
"upronto" is an insance of a "Pronto" java enum:public
enum Pronto {N
,UNKNOWN
,Y
;}
"Pronto" can be : (Y, N, UNKNOWN)Here is the rule which reasons over this enum:(ofcourse I have got a Request into WM as well)rule "ScorePronto"
dialect "mvel"
ruleflow-group "Scoring"
when
$r:Request( $mc:mainContract != null )
$cw_p:ContractWrapper($c_w_p:mycontract == $mc, eval(upronto != Pronto.Y))then
System.out.println("Test Result: "+($cw_p.upronto == Pronto.Y))
endAny guesses for the output???Well....Test Result: trueHOW COMES???????????????????I mean ... the test "eval(upronto != Pronto.Y)" returned "true".... It means that the ruleengine sees upronto <> Pronto.Y!, doesn't it??!!!!So... why do I get "upronto == Pronto.Y" in the RHS????What the.........&$%%&()%%$/%£....sorry....but having thesekind of problems during saturday night is not so pleaseant!T-TI really hope you can help me with a workaround to this issue.ByeMassi
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users