This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Java Products and Servers and the fly likes Jess Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Jess Question" Watch "Jess Question" New topic
Author

Jess Question

Hunter McMillen
Ranch Hand

Joined: Mar 13, 2009
Posts: 492

Hi all,

I am working on a Jess application to advise users on which programming language to use. I wanted to ask the questions in a specific order and was wondering if that was possible without adding some condition to the rules.

Right now to get them to fire in the order i want I have to do this:



I was wondering is there was a better way of doing this.

Thanks.
Hunter.

"If the facts don't fit the theory, get new facts" --Albert Einstein
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

If there is a specific order in which you want to ask a set of questions, then that order has to be encoded somehow. This is one way to do it. Another way would be just to keep an explicit list of the questions in the order in which you want to ask them. Have a look at the "stack" example that comes with Jess, in which a bunch of rules all operate on a shared list structure. A third way would be to encode the dependencies as facts -- for example, each question fact might include a multislot holding the names of the questions that must be asked before it. Then the question-asking rule would just ask whatever questions had all their prerequisites met. I think I like that last one best.


[Jess in Action][AskingGoodQuestions]
Hunter McMillen
Ranch Hand

Joined: Mar 13, 2009
Posts: 492

The third way you mentioned sounds like it will work perfectly for my program. Thank you for your response.

Hunter
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jess Question
 
Similar Threads
Embedding Jess into Java
JESS: exist and test functions
About jess engine rule
need help:dos based .clp to java gui
jess