when$mc: Contract() from maincontractthen#rule fired over "the" main contractendwhen$rc: Contract() from relatedcontractthen#rule fired over "a" related contractend
----- Original Message -----From: Edson TirelliTo: Rules Users ListSent: Saturday, January 05, 2008 12:00 PMSubject: Re: [rules-users] Checking fact "id"
What attribute differentiates A1 from A2?
Such scenarios usually are solved by an additional constraint...
[]s
Edson
2008/1/4, Massi Gmail < mmquelo@gmail.com>:Hi guys,Now I am strugglin' with "fact id checking" or whatever we can call it.... :DLet's take into account the followong scenario:I have class A (it's just a name) javabeans to be inserted into the WM.I define two objects of class A: A1 and A2.Somewhere I do "insert(A1)" and "insert(A2)" ( let's say I do it in the same package of R1 and R2..see below...)Then I define two different rules R1 and R2 that reason over class "A" facts (let's say R1 and R2 are in the same package) .The point is.... I want R1 to fire only on A1 and R2 only on A2.Is that possible in drools? Is there a sort of "fact id" I can reason over?I do not think globals will be of any help, cause in the guide i have read that globals should never be used within LHS.We should never reason over globals.Let me know.Massi
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users