Maybe you could use a 3rd value...
(not syntaxically correct as well, but the idea remains the same)
(defrule ruleA
(and (not(found ?f)) (or (value1 ?v1) (value2 ?v2))
==>
(printout t "GOT IT" crlf)
(assert (found ?f)))
Regards,
Bruno
Bob Stewart wrote:
>
> Hello,
>
> I have a situation where I want to match a rule only
> one time, but the rule has an or clause in it.
> Here is a simple (not 100% syntactically correct)
> example.
>
> (defrule ruleA
> (or (value1 ?v1) (value2 ?v2))
> ==>
> (printout t "GOT IT" crlf))
>
> if I were to assert two facts,
> (assert (value1 Yes))
> (assert (value2 No))
>
> And do a (run), I will get two matches. I looked at
> unique, but that can only be used
> with one value.
> I also tried exists, but I have had no success.
>
> I would like for "GOT IT" to be printed out
> only once.
>
> Thanks,
> Bob Stewart
>
---------------------------------------------------------------------
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]
---------------------------------------------------------------------