Does this mean I can use the same for both rules.
Now if you look at my query, "Using multiple objects in LHS",  I have given an example.
So, how do I use the country object with attr name = "USA" in the second rule. do i have to
do the filtering again.
I will attach the example here again.

;;If the name attr in Country instance is "USA", then call a method on Country object
;;that would return an array of State objects. Change the name attribute of the State object
;;to "Northern Virginia" if the name attr is "Virginia".
(Defclass country Country)

(defrule search-country
        (country (name ?name) (Object ?country))
        (test (eq "USA" ?name)
=>
        (call ?country getStates)

I am not sure how to proceed further.

Thanks,
Adarsh

friedman_hill ernest j wrote:

No; just write both rules and they will both fire. Jess will combine
their left-hand-sides automatically.

I think Adarsh Jain wrote:
> Hi,
> Can you invoke another rule from the RHS that works on the same facts.
>
> Thanks,
> Adarsh

---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                 http://herzberg.ca.sandia.gov
Livermore, CA 94550

-- 
Adarsh Jain
Longitude Systems, Inc
Ph: 703-818-5436
 


Reply via email to