[rules-users] Function and return value
Wolfgang Laun
wolfgang.laun at gmail.com
Thu Sep 8 03:54:18 EDT 2011
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 at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110908/ef2e880d/attachment.html
More information about the rules-users
mailing list