Re: JESS: Defrule Pattern Matching and Shadow Facts

2008-10-31 Thread John Chrysakis
How can I combine slots (shadow facts) from different deftemplates in the same clp file. I need a rule of the form: (defrule Test-rule (Beanclass1 {slot1 == stringvalue }) AND (Beanclass2 {slot2 == closed}) = (printout t FIRE!! crlf) I am running runUntilHalt through api

Re: JESS: Defrule Pattern Matching and Shadow Facts

2008-10-31 Thread Ernest Friedman-Hill
Nothing you've shown us is the least bit unusual, and it should work perfectly well. The problem must be in something you're *not* showing us, either in the JavaBeans somehow (although I can't imagine how) or in some other Jess code. If you can send me, personally, by email, a COMPLETE,

Re: JESS: Defrule Pattern Matching and Shadow Facts

2008-10-31 Thread Robert Kirby
JavaBeans may need correct capitalization. For variables mainDoorState and userLocation, which both follow the standard convention of beginning with lower case and internal capitalization of words, the access methods should capitalize the first letter after get or set such as getMainDoorState

JESS: Defrule Pattern Matching and Shadow Facts

2008-10-30 Thread John Chrysakis
Hello to jess community, I have a problem with the patterns of a rule In my clp file I have defined: (deftemplate Door(declare (from-class Door ))) (deftemplate User(declare (from-class User ))) (defrule MainDoor-rule (Door {mainDoorState == closed}) (User {userLocation == NearDoorRegion })