Well, when I Use the rule:

(defrule trans-rule
   (transition (mode ?m))
=>
   (printout t "mode=" ?m crlf)
)

Mode has normally the value that must have.
But when I am trying to combine the slot mode with another pattern
the rule never fires. Why??

(defrule LightDimValueChanged-rule
    "Rule for receiving screenregionEvent"
      (transition (mode ?m))    <======== If i reject this line, everything is 
OK, WHY?

(CurrentEvent {nameofevent == "LightDimValueChanged" }
 (nameofevent ?name) (emmiterofevent ?emit)(stateofevent ?state))
    => (bind ?topclass "Device") (bind ?property "dev_state")(bind
?typeofnewvalue "str") (printout t "LightDimValueChanged-rule Fired! ")
    (calling updateKB ?topclass ?property ?emit ?state ?typeofnewvalue)
        (printout t "Now Mode is" ?m crlf))




On Wed, 29 Oct 2008, Ernest Friedman-Hill wrote:

> You still haven't explained quite what the problem is. Are you saying
> that yes, you are calling setSlotValue() on facts in working memory?
> You can't do that; you must use Rete.modify() to make changes to
> "live" facts. setSlotValue() is appropriate only for constructing
> facts before they are asserted.
>
> On Oct 29, 2008, at 7:01 AM, John Chrysakis wrote:
>
> >
> >
> >
> > On Tue, 28 Oct 2008, Wolfgang Laun wrote:
> >
> >> I've been trying to guess what's bothering you or what your
> >> actual problem is, since setting a slot via setSlotValue doesn't
> >> affect the way slots can be bound to variables in left hand side
> >> patterns of rules.
> >>
> >> If you are having problems: You didn't use setSlotValue on
> >> a fact that was already asserted into working memory?
> >>
> >
> > That's right!!!
> >
> >
> >
> >> Or do you want to construct a rule by API calls??
> >
> > No I have a clp file where all my rules are located.
> >
> >
> > Any help???
> >
> >
> >> On Mon, Oct 27, 2008 at 12:46 PM, John Chrysakis <[EMAIL PROTECTED]
> >> >wrote:
> >>
> >>>
> >>> Hello,
> >>>
> >>> 1 simple question: i have created the following template:
> >>>
> >>> (deftemplate transition
> >>> (slot mode)
> >>>
> >>> I set it's value via setSlotValue (java api)
> >>>
> >>> How can I bund the slot mode in a variable in order to
> >>> use it in a defrule??
> >>>
> >>> Thanks in advance,,,
> >>>
> >>>
> >>>
> >>> --------------------------------------------------------------------
> >>> 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]
> >>> .
> >>> --------------------------------------------------------------------
> >>>
> >>>
> >>
> >
> >
> > --------------------------------------------------------------------
> > 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]
> > .
> > --------------------------------------------------------------------
>
> ---------------------------------------------------------
> Ernest Friedman-Hill
> Informatics & Decision Sciences, Sandia National Laboratories
> PO Box 969, MS 9012, Livermore, CA 94550
> http://www.jessrules.com
>
>
>
>
>
>
>
> --------------------------------------------------------------------
> 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]
> --------------------------------------------------------------------
>
>


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