Thanks for the sloution.

i tried it differently and i think it is working.

the way i tried is 

str = "(assert ("+entity;     str += "("+attribute+" "+value+")";     str +=
"))";

AND

 engine.executeCommand(str);

can u suggest  whether it is currect or not


Ernest Friedman-Hill wrote:
> 
> Why not create and assert the facts directly from your Java code? See, for 
> example, here:
> 
> http://herzberg.ca.sandia.gov/jess/docs/70/library.html#unordered_fact
> 
> which shows you exactly how to do this.
> 
> On Friday 20 April 2007 1:16:02 am rameshs wrote:
>> i am get values to the slots and multislots from user through GUI writen
>> in
>> java.
>>
>> I have the values in java variables. i have to assert these values.
>>
>> i am using this deftemplate
>>
>> (   deftemplate emp (slot id (type integer))
>>         (    slot name )
>>         (multislot dept ))
>>
>> and i can able to assert using
>>
>>  (assert (emp(id ?n)(name "raju")))
>>
>> and i can bind the value to ?n using
>>
>> (bind ?n 101)
>>
>> but how can i assign the vaue to ?n using java variable.
>>
>> for eg.
>>
>> ?n = emp_id;
>> where emp_id is a java variable to which i will get value from user.
>>
>> is it possible
>>
>> Thanks in advance
> 
> 
> 
> -- 
> ---------------------------------------------------------
> 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]
> --------------------------------------------------------------------
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/asserting-facts-using-variables-tf3611246.html#a10133832
Sent from the Jess mailing list archive at Nabble.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]
--------------------------------------------------------------------

Reply via email to