On 07/02/2012 08:49, Wolfgang Laun wrote:
Developers:
it would be *very nice* to have a clarifying statement as to whether
the triplex relational expression is valid or not, so that a proper
issue might be raised.
I discussed this with edson, he spat out his corn flakes and
said it
would be a cold day in hell before he adds that request :)
Status in 5.3.0: accepted by the DRL parser and resulting in unknown semantics.
We'll tighten that to correctly report an error for next 5.4 release.
Mark
Thanks
Wolfgang
---------- Forwarded message ----------
From: "Welsh, Armand"<AWelsh(a)statestreet.com>
Date: Mon, 6 Feb 2012 23:18:08 +0000
Subject: Re: [rules-users] How to write rules in two fact's fields?
To: Rules Users List<rules-users(a)lists.jboss.org>
The Drools documentation states that the left side of any binding
pattern of any conditional element must be a read-only property of the
element (or nested property). As such you must rewrite your rule.
Try this:
rule "rule_Name"
when
per: Person(age>= 50&& < 100, income>= 10000&& <
50000,
occupation == "Business", category == "Military", location ==
"Bangalore", custype == "Individual")
pri: Price((price>= 20&& < 30) || price == 1)
then
System.out.println("Success");
end
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of shanmuga
Sent: Sunday, February 05, 2012 3:33 AM
To: rules-users(a)lists.jboss.org
Subject: [rules-users] How to write rules in two fact's fields?
Hi,
I want to know, how to write rules in two fact's fields?
I used two facts, it will take AND condition or OR condition in between the
two facts.
Please check my code....
package Project
import com.sample.Person;
import com.sample.Price;
rule "rule_Name"
when
per:*Person*(50<= age< 100, 10000<= income< 50000, occupation
== "Business", category == "Military", location ==
"Bangalore", custype ==
"Individual")
pri:*Price*((20<= price< 30) || price == 1)
then
System.out.println("Success");
end
The both fact values are satisfy means, what is the output?
I got output, even the *Price* fact's value is wrong. (price == 100)
Please slove my problem........!!!!
--
View this message in context:
http://drools.46999.n3.nabble.com/How-to-write-rules-in-two-fact-s-fields...
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
_______________________________________________
rules-dev mailing list
rules-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev