Please produce a complete set of DRL and .java files showing the problem so that it can be reproduced.
-W

On 7 September 2011 17:53, snehils <snehils@gmail.com> wrote:
I have made a function in drl file. This function is calling another function
from java file. This java file function returns an object, that I am not
able to get.

function SomeObject testFinction(SomeObject obj1) {
       String str;

       // Some calculations
       // ...
       str = "something after calculation";

       // this function will return SomeObject based on str value
       SomeObject obj2 = Util.getSomeObject(str); // problem is here. obj2 is
updated with same value of obj1. Expected value is diffrent from obj1.
Checked getSomeObject(). It is working fine.

       // Some other calculations...
       // ...

       return anotherSomeObject;
}

rule "Check SomeObject"
       when
               //eval(tlvID == "57")
               someObj:SomeObject(id == "123")
       then
               testFinction(someObj);
end

I am using drool version 5.1.0.

--
View this message in context: http://drools.46999.n3.nabble.com/Function-and-return-value-tp3317132p3317132.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users