jess-users  

Re: JESS: Re: the problem of query working memory

Weijing Bai
Fri, 30 Oct 2009 04:10:02 -0700

the problem has been solved, thanks a lot.

On Fri, Oct 30, 2009 at 9:55 AM, Nopphadol Chalortham
<nopphad...@gmail.com>wrote:

> I think this code, It may be work.
>
> *QueryResult result = engine.runQueryStar("mid1", new
> ValueVector().add(jf).add(I)); *
>
>
>
>
> On Thu, Oct 29, 2009 at 3:40 PM, Weijing Bai 
> <estherbaiweij...@gmail.com>wrote:
>
>> 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 
>> <estherbaiweij...@gmail.com>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!
>>>
>>
>>
>