Dear Jess users,
I am still learning the ropes, and cannot find an answer to the following
question either online or in the 'Jess in action' book. Is there a way to
match facts in a LHS based on the presence of a slot?
For example, I have two templates:
(deftemplate A (slot score))
(deftemplate
Dear Jess users,
I am wondering how to write a rule that would dynamically match multiple
facts based on their names.
Let say I have two types of facts; one representing the information that an
item (with a given name) exists, and the other one representing a list of
items (e.g., as a list of
Thank you very much for this answer. It seems like 'forall' will fire the rule
only if all the 'bag-of-items' facts are validated (i.e., if all of them have
'item' facts with the names listed in their 'names' slot). Is that correct?
If yes, then what I am trying to do is slightly different. I
Thank you for this tip. It is not what I am trying to achieve, however. I must
apologize if my original email was misunderstood.
My goal is to write a rule that would fire for any 'bag-of-items' fact whose
item names, as listed in a multislot, are all represented by 'item' facts. The
rule