Hi, please note this java/jess program: I  want to pass a java string
vector("nomijava") as a fact and fire the rule "regola".My vector fact
is caught by Jess but at "run" command don't fire anything!!!!
Why????

R.

import jess.*;
import java.util.*;
class ArrayRule {
 public static void main (String[] unused) throws JessException{
  String[] nomijava= new String[4];
  nomijava[0]="R";
  nomijava[1]="e";
  nomijava[2]="w";
  nomijava[3]="q";

  ValueVector nomi= new ValueVector();
  for (int i=0;i<nomijava.length;i++){

  nomi.add(new Value(nomijava[i],RU.ATOM));

  }

  Rete r=new Rete();
  Fact f=new Fact (nomi.toString(),r);
  r.executeCommand("(batch jess/scriptlib.clp)");
  r.executeCommand(
 "(defrule regola"+
 "(R ?x ?y ?z)"+
 "=>"+
 "(assert(R a b c )))");
  r.reset();
  r.assert (f);
    r.run();
  r.executeCommand("(facts)");
  }
}


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