On Tue, Dec 2, 2008 at 6:11 PM, John Chrysakis <[EMAIL PROTECTED]>wrote:

>
> First of all,
>
> Thanks a lot for your time,
>
> Is there another way to do the same action instead of using
> the getObjects/Filter technique?
>
> I need a generic method to update sprcific shadowFacts...
>
>
You could write a defquery and run this.

Better still, you define a template
   (deftemplate DoorNameState (slot name)(slot state))
and a rule
   (defrule UpdateDoorState
     ?dns <- (DoorNameState (name ?n)(state ?s))
     ?d  <- (Door (name ?n))
 =>
    (modify ?d (state ?s))
   (retract ?dns)
)

To update, just assert a DoorNameState fact.

-W

Reply via email to