To use the function in the LHS of a rule:
when
eval ( getinfo(return).equals("TEST") )
then
but as stated in this prior response, if you have POJO with get methods, you can use the
standard mvel syntax to query it.
If return is a variable that is an object you can also do your test like this:
when
FactType ( somevalue == "TEST" ) from return
Then
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of Wolfgang Laun
Sent: Tuesday, June 12, 2012 6:10 AM
To: Rules Users List
Subject: Re: [rules-users] getInfo(return).equals("TEST") function is not
working as expected
If method getInfo() returns the value of some field of a fact (object)
you can simply write
FactType( info == "TEST" )
What you quote from your code isn't likely to be correct; it's
certainly incomplete and, therefore, no basis for constructive
remarks.
-W
On 12/06/2012, vysrinivas <vysrinivas(a)gmail.com> wrote:
Hi,
i have below condition in my drools file.
getInfo(return).equals("TEST") function is not working as expected
getInfo function will return a string value. If it is equal to "TEST", then
i should not do further validation.
can you please let me know what might be the issue?
and there are other few conditions in which the same equals condition is
working without any issue.
regards,
Sri.
--
View this message in context:
http://drools.46999.n3.nabble.com/getInfo-return-equals-TEST-function-is-...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users