Hello again,

I was wondering if I can call the update method  explicitly from jess
code instead of api call.

Something like this:

(defrule rule

     (Door  (OBJECT ?dev) {doorname == "Door1" })
    =>

        (update ?dev)

is this valid? because I am getting Message: No such variable dev

thanks!

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


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