> 
> You could, instead, just use
> 
>   (bind ?s ((engine) getActivationSemaphore))
>   (synchronized (?s)
>       (?s wait))
>   
> which won't allow any more rules to fire at all until a new
> activation
> comes in.
> 

With this I got the following problem:

(defrule foo
  (answer (id age) (tekst ?age))
  (test (<= (integer ?age) 21))
  =>)

Backward chaining is done for the answer fact. Imagine the user 
answered that he was older than 21. No new activation will occur, if 
this was the only rule needing the answer on the user's age. So Jess 
will keep waiting for an activation, forever. 

I had the same problem with waitForActivations, altough the use of that 
function caused more errors. Asking 10questions at a time, wrong fetch 
of the QUESTION fact, which caused wrong asserted answers etc.. The 
fetch could be prevented though by letting the rule get-answer assert 
the answer fact, instead of the function it called. But asking 
10questions at a time, with overlapping windows, is very confusing for 
the user.

What I really need is something that makes the execution cycle pause 
until a fact is asserted, or just something that pauses it until run is 
called again.

Regards,
Steffen.

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