hi,

i have been trying for a week to get a simple jess program running from java but
haven't been successful yet. this is to form part of an expert system for
engineering materials selection. i have the following line of code in a java
program

try {
        ruleEngine.executeCommand("(batch test2.clp)");
        ruleEngine.executeCommand("(assert (property (name Density)(suitability
ok))(property (name Shear Modulus)(suitability ok))(property (name Youngs
Modulus)(suitability perfect)))");
                Value value = new Value(ruleEngine.executeCommand("(run)"))

the fact asserted from java matches a rule in "test2.clp":

(defrule acceptable-match1 (property (name Density)(suitability ok))(property
(name Shear Modulus)(suitability ok))(property (name Youngs
Modulus)(suitability perfect))=>(printout t "ok"))

i have tried to catch the output in the Value value but when i try to convert
this to a string using value.toString() i get "ok" printed to the console window
  but the only value in the value.toString() is 1.

the program examines the contents of value.toString to see if it contains "ok"
so it knows a rule has been activated but at the moment all it is getting is
"1" so it thinks the rule hasn't been activated yet.

anyone any ideas?

thanks,
rowan

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