Using 
drools 5.1

mvel 2-2.0.14


In consequence (then) block : (dialect strict or not does not make a difference)


Trying to sum up some numbers after a multiplication operation. For example :


t.out = t.in2*t.in3 + t.in3*t.in4 + t.in2*t.in4;


(the object t has all its attributes of the type String), and all the t.in 
parameters are actually numbers-as-strings.

So the multiplication is going on fine, as expected, but the addition (+) sign, 
is concatenating instead of adding.


So the for inputs "1", "2" and "3", the result looks something
like : 2.06.03.0  (i.e concetenated) instead of the expected 11.0.


What is going worng  How does the + operator decide to do concat instead of 
doing addition.


Any documentation on this + operator logic ?


Note : The above works fine when I use MVEL without Drools.


Thanks 



      
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to