I think Sajindra Jayasena wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi All, 
> I need some more clarification on creating the rule. 

I think the reason no one replied to this the first time you posted it
was that we would need some more clarification on what exactly you
want to know. Adding "URGENT!!!" to the subject line doesn't make your
questions any easier for us to understand.

It sounds like you've jumped into writing some Java code to generate
rules automatically, without any understanding of the Jess language or
Jess rules. This is really not going to work: you need to walk before
you can run. Make a nice cup of tea, sit in a comfy chair, and read
the whole manual. Look through the examples. Write a short Jess
program or two. Then read the manual again. Then, and only then, you
might think about writing a code generator!


> As per the explanation given by Mr.Friedman, i think that the DISCOUNT would
> be a global variable and not for that particular rule. 
> ( If 2 rules ( for different sales values ) have 2 discount rates , how are
> these 2 differentiated.? 

There are deep architectural questions here, but I can only give you
very shallow answers until you have a better understanding of Jess's
capabilities. 

> 
> 2. Also what I am planning is to provide a cuatomizable interface for
> calling/firing a rule from one of my classes. for e.g. 

The programmer neither fires nor executes rules in Jess. Jess decides
when and how to fire rules all by itself. Again, you need to get a
better understanding of how Jess works.


> 4. Also how would the output be retrieved? 

As I've said before, there are many ways to do it. The first step,
though, is to learn enough about Jess such that you can define what
you mean by "the output."

> 5. Please clarify whether the approach I am trying out is wrong. If so
> please correct me . 
> 
> summarising the requirement as per the earlier example. 
> 
>   first a Customer Entity would be created using DefTemplate. 


A deftemplate is like a class definition in Java, and a fact is like
an object. So you need to define a customer template, and then assert
one or more customer facts.

>   then a  sale is made by a customer ( i think for this a entity should be
> created for representing sales???? 

Most likely, yes, but this is your program, it's up to you.

> then a rule should fire and I should get the discount as 10% . I think I can
> use the STORE function . pls verify ??? 

(store) is one of many ways that such a rule could pass the computed
discount back to java.


> But then how is the LHS being constructed ( the syntax ). Please provide me
> some help on this regard. 

I hope I have.


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

--------------------------------------------------------------------
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