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, runnable example
-- i.e., all Java and Jess code -- then I will probably be able to
tell you what's going wrong. But just based on what you've shown us so
far, there shouldn't be a problem.
On Oct 31, 2008, at 9:07 AM, John Chrysakis wrote:
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 calls and rete.add/update
for adding the knowledge. I have found that the problem is located
in the rule since the getSlot1 and getSlot2 are called normally.
Any help please?
thanks.
On Thu, 30 Oct 2008, John Chrysakis wrote:
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" })
=>
(printout t "@@@ YES @@@:" crlf))
Door,User are the Bean classes which contain the required methods:
getmainDoorState, getuserLocation
I add an instance of each class into WM but the rule never fires even
though it calls correctly the above methods.
But if I try to reject one LHS condition , the rule fires normally...
Why this happens?
Should I add something to the syntax of the rule
in order to check both conditions??
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]
--------------------------------------------------------------------