apologies if it isn't fair to post a very basic question here. But since it killed few hours of mine i thought that I someone here can rescue me. I have a cbr which uses javascript which looks like below(protoype).
function
rule(){
var
x = XQ_getProperty("x");
var
y = XQ_getProperty("y"); XQ_logInformation(
"in js"+x); XQ_logInformation(
"in js"+y);
if
(x == y)
{ XQ_logInformation(
"Equal");
return
XQ_getService("a");
} if
(x != y)
{ XQ_logInformation(
"Not Equal");
return
XQ_getService("b");
} } The abover function always go to Not equal part and routing to service b. I printed the values and confirmed that they are same. I am confused what I am missing here. Please assist. P.s. I tired the same thing with a cbr file and the same result. Not sure how to implement this logic in xcbr.
x.equals(y) worked!! dint believe that java string comparison operator will do the trick.