On 6/26/06, erich.oliphant <[EMAIL PROTECTED]> wrote:

...Modules don't really work as a rule could be in more than 1 grouping.

Hi Eric,
Why can't you use modules and include one or more "trigger facts" in
your rules in addition to the current LHS patterns?

That way you could have rules that are identical in what actions they
take, but differ only in the state that causes their activation.

For example:

(defmodule MODULE1)
(defrule MODULE1::rule-1
   "Some rule to do something"
    ;; Initial trigger fact
    (trigger-1)
    (main-fact (some-slot ?ss) (another-slot ?as))
=>
    ;; Do action(s)
)

(defmodule MODULE2)
(defrule MODULE2::rule-1
   "Some rule to do same as rule-1 in MODULE1"
    ;; Note the different trigger fact
    (trigger-2)
    (main-fact (some-slot ?ss) (another-slot ?as))
=>
    ;; Do action(s)
)

Cheers,
Jason

-----------------------------------------------------
Morris Technical Solutions LLC
www.morristechnicalsolutions.com
[EMAIL PROTECTED]
phone/fax: 503.692.1088
--------------------------------------------------------------------
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