I think Alexander Lamb wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Although I only have 5 rules, I get into a strange loop.
>
> Here is the rule that fires continuously:
>
> (defrule ASP1
> (OrmedContext
> (readyToRun TRUE)
> (task "script")
> (OBJECT ?c)
> )
> (CompleterResponseElement
> (ormedContext ?c)
> (key "ASP")
> )
> =>
> (bind ?s (new OrmedScript "ASP"))
> (call ?c setSelectedScript ?s)
Presumably selectedScript is a property of OrmedContext, and changing
its value here fires a propertyChangeEvent, which re-activates this
rule when the OrmedContext fact's slots change (even though you're not
matching on the selectedScript property, the rule is still
reactivated.)
You really only mean this rule to apply when selectedScript is nil, so
you should state that explicitly:
(defrule ASP1
(OrmedContext
(readyToRun TRUE)
(task "script")
(selectedScript nil)
(OBJECT ?c)
)
...
When the rule fires, selectedScript becomes non-nil, and the rule
won't be reactivated.
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9012 [EMAIL PROTECTED]
PO Box 969 http://herzberg.ca.sandia.gov
Livermore, CA 94550
--------------------------------------------------------------------
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]
--------------------------------------------------------------------