aspose file tools*
The moose likes Other Java Products and Servers and the fly likes questions about JESS, Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "questions about JESS," Watch "questions about JESS," New topic
Author

questions about JESS,

assia assiatoune
Greenhorn

Joined: Jul 11, 2004
Posts: 16
hello ,first thanks fo all again!
I ma goig to permit to me asking you two other problems I faced in my project: the first one is :
how to change the directory outPut of the result of the inference with JBuilder.
As I said in my last questions,I'm working with JBuilder so after using the command"batch 'a file'" ,the result will be visualized on the JBuilder OUtPut directory.
if I want to visualize it on my own OUtPut directory,for example on a "TextArea" what must I do?
the second one is :how to suspend the result of the inference.
the command (halt) doen't work.
where must I put it in the (file.clp) that I load ,or using the rete.executeCommand("(halt)")?. I used it in the two cases but without any result.Why?
thanks a looooooooooooooooooot. luyza.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Originally posted by assia assiatoune:
hello ,first thanks fo all again!
I ma goig to permit to me asking you two other problems I faced in my project: the first one is :
how to change the directory outPut of the result of the inference with JBuilder.
As I said in my last questions,I'm working with JBuilder so after using the command"batch 'a file'" ,the result will be visualized on the JBuilder OUtPut directory.
if I want to visualize it on my own OUtPut directory,for example on a "TextArea" what must I do?


I'm not at all sure what you mean by "output directory" here; but let's assume you mean "window where textual output appears." In that case, there's a whole section in the Jess manual (and in the book "Jess in Action", as well) about I/O routers, which is what you'll need to use. See sections 4.4.6 and 4.4.7 of the Jess 6.1 manual.


the second one is :how to suspend the result of the inference.
the command (halt) doen't work.
where must I put it in the (file.clp) that I load ,or using the rete.executeCommand("(halt)")?. I used it in the two cases but without any result.Why?
thanks a looooooooooooooooooot. luyza.


Not seeing your entire application, I can only guess, but my guess is that you're trying to somehow call "halt" from the same thread that's already busy calling "run". The "halt" function obviously can't do its work if it doesn't get called, and it won't be called if "run" is still running on that same thread. But if the engine is running on one thread, and you call halt from another, then things should work fine.

Note, though, that "executeCommand()" is itself synchronized -- you can't call it twice simultaneously, so even if you're using multiple threads, that still may be the source of your problem. Use Rete.run() and Rete.halt() directly instead -- executeCommand() is only for cases where there isn't already a Java method in the public API that does the same thing as the Jess function you want to execute.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: questions about JESS,