• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

questions about JESS,

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
reply
    Bookmark Topic Watch Topic
  • New Topic