i just slove it by change the code to :

 result = engine.runQueryStar(sRule, vv );

hope it can help u.

On Thu, Oct 29, 2009 at 4:28 PM, Weijing Bai <[email protected]>wrote:

> i hava a problem when use runQueryStar with two params. with only one param
> situation it can works well. but with two params it's report:
>
> Jess reported an error in routine runQuery.
>   Message: Wrong number of variables for query mid1.
>  at jess.Rete.doRunQuery(Rete.java:2889)
>  at jess.Rete.runQueryStar(Rete.java:2824)
>  at jess.Rete.runQueryStar(Rete.java:2807)
>  at test.MidCengSequence(test.java:255)
>  at test.TOSequenceADL(test.java:394)
>  at test.main(test.java:492)
>
>
>
> the program is:
>
>
>       ValueVector vv = new ValueVector();
>       vv.add(jf);
>       vv.add(I);
>       Value myList = new Value(vv, RU.LIST);
>       result = engine.runQueryStar(sRule, new ValueVector().add(myList) );
>
> the clp is :
>
> (defquery mid1
> (declare (variables ?x ?i))
>      f1<- ();
>      f2<-();
> )
>
>
> thanks very much!
>

Reply via email to