[Gbbopen-list] agenda-shell activation/obviation/retrigger puzzle

Dan Corkill corkill at gbbopen.org
Wed Mar 14 16:49:37 EDT 2007


> Suppose I have several ksa's that are pending. One of those will be
> selected to have it's execution-function called. I want a side effect
> of that to block the execution of the others until some later state
> change. I thought that the :activation-predicate might be useful here
> but see that once it returns nil the ksa is never given a chance to
> become active again. This seems the same as obviation.
> So, how can I temporarily block and later restore activation or
> equivalent?

Paul,

You are correct in assessing that activation-predicate and
obviation-predicate apply to whether a KS is activated or remains
pending, and that they are one-shot (can't be undone) decisions.

The traditional "trick" in doing what you want is to use the KSA rating
value to make the pending KSA non-executable by lowering the rating
below the minimum-ksa-execution-rating.  The default
minimum-ksa-execution-rating is 1 (and by convention, is rarely
changed), so setting a KSA's rating to zero will make the KSAs
non-executable (but still pending) until the rating is raised later on.
 (This "trick" is one of the reasons the default minimum is 1--a nice
convention where negative & 0 can mean non-executable.  Note that you
can "remember" the old rating my simply negating it (to block) and
re-negating it later (to unblock).

This approach does have the small cost of a pending-ksa queue insertion
on each transition to/from blocked.

-- Dan

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Gbbopen-list mailing list