Please produce a complete set of DRL and .java files showing the problem so that it can be reproduced.<br>-W<br><br><div class="gmail_quote">On 7 September 2011 17:53, snehils <span dir="ltr">&lt;<a href="mailto:snehils@gmail.com">snehils@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I have made a function in drl file. This function is calling another function<br>
from java file. This java file function returns an object, that I am not<br>
able to get.<br>
<br>
function SomeObject testFinction(SomeObject obj1) {<br>
        String str;<br>
<br>
        // Some calculations<br>
        // ...<br>
        str = &quot;something after calculation&quot;;<br>
<br>
        // this function will return SomeObject based on str value<br>
        SomeObject obj2 = Util.getSomeObject(str); // problem is here. obj2 is<br>
updated with same value of obj1. Expected value is diffrent from obj1.<br>
Checked getSomeObject(). It is working fine.<br>
<br>
        // Some other calculations...<br>
        // ...<br>
<br>
        return anotherSomeObject;<br>
}<br>
<br>
rule &quot;Check SomeObject&quot;<br>
        when<br>
                //eval(tlvID == &quot;57&quot;)<br>
                someObj:SomeObject(id == &quot;123&quot;)<br>
        then<br>
                testFinction(someObj);<br>
end<br>
<br>
I am using drool version 5.1.0.<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Function-and-return-value-tp3317132p3317132.html" target="_blank">http://drools.46999.n3.nabble.com/Function-and-return-value-tp3317132p3317132.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br>