I still haven't done my homework to try to understand the Protege "world view". Between Jess facts, Java objects, Protege instances, fact ids, etc, I really can't give you the exact answer you're looking for. But I can give you the form of the solution easily enough. You rule should match at least two facts on its left hand side: the one you want to change, and the Customer_State fact. Then you can bind a variable to whatever part of this fact you want to shove into the multifield, and use that on the rule's right hand side.
On Tuesday 24 April 2007 4:03:09 pm Shahab1355 wrote: > Hi everyone, > I am new to jess and JessTab. I have a problem in writing rule chnaging > relation between instances. > I have mapped class Customer to in JessTab and it has one instance > "Customer_Inst" : > (MAIN::object (is-a Customer) (is-a-name "Customer") (OBJECT > <Java-Object:edu.stanford.smi.protegex.owl.model.impl.DefaultOWLIndividual> >) (:NAME "Customer_Inst") (hasEntityName "Customer") (hasCurrentState > <Java-Object:edu.stanford.smi.protegex.owl.model.impl.DefaultOWLIndividual> >) )) > > in which customer has a multislot "hasCurrentState" refering to an instance > of class Customer_State , Class Custimer_Sate also has mapped in Jesstab > and it has two instances : "Customer_Ready", "Customer_Waiting" > > (MAIN::object (is-a Customer_State) (is-a-name "Customer_State") (:NAME > "Customer_Ready") )) > (MAIN::object (is-a Customer_State) (is-a-name "Customer_State") (:NAME > "Customer_Waiting") )) > > the hasCurrentState slot of "Customer_Inst" has already initilaized with > "Customer_Ready" . Now I want to write a rule in which such that: > if (hasCurrentSate Customer_Inst Customer_Ready) then (hasCurrentSate > Customer_Inst Customer_Waiting) > > In otherwords, I just want to break the old relation and assign new > realtion. I can do this easily if hasCurrentState take "string" type, but I > couldn't write similar rule for Instance type. > > I do appreciate your help, > > Shahab -- --------------------------------------------------------- Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://www.jessrules.com -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------
