Hi,

      When i am loading the rules and facts file though "batch" command the
"user-ok-rule" gets fired and
 fact UserOk is asserted. However , if i load the rules file through batch
and Facts from java , the rules
 doesn't get fired. Please help, using Jess61p4.

      Rules File (rules.clp) :

      ;; User Rule
      (defrule user-ok-rule "Checks if user exists and is active"
            (user-param ?up)
            (user (id ?up) (status Active))
            =>
            (assert (UserOk))
      )

      Facts File (facts.clp):

      (assert (user-param IGEN102))
      (assert (user (id IGEN102)(status Active)(type Customer))   )

      Java Code :

            Fact  userParamFact     =     new Fact ("user-param" , engine);
            userParamFact.setSlotValue("__data" , new Value("IGEN102" ,
RU.ATOM));
            engine.assert(userParamFact);
            engine.executeCommand("(assert (user(id IGEN102)(status
Active)(type Customer)))" );


Sanjay

--------------------------------------------------------------------
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