Hi,

The syntax you're using is so unlike Jess's syntax that I wonder if
you're trying to use rules written for some other rule engine -- or
perhaps you're just inventing the syntax yourself?

Matching to member variables is a bad idea since Jess can't be
notified if those members change. If you want to do it anyway, then
you need to do so using explicit function calls, as shown below. As
far as calling the "callInsert" function, there's no problem with
that, but you do have to use the correct syntax.

Here is a corrected version of your rule.

(defrule dbrule
  (db (OBJECT ?o&:(eq "INSERT" (get-member ?o action))))
  =>
  (?o callInsert))


I think vijaykrishna wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi all,
>       Iam not able to run this kind of rule given below, how can i modify this
> rule
> 
>   Example:
>       ( defclass db TestingDB )
>       ( defrule dbrule
>            (db.action="INSERT") // action is a public variable in TestingDB Class
>            =>
>            ( db.callInsert() ) // callInsert is the public method in TestingDB
> Class
>       )
> 
>       Where  the variable action (db.action ) is the pulblic String variable in
> the TestingDB         java Class , and callInsert is the method in TestingDB java
> class.
> 
>   Now how can i test this kind of rule .Please give me some examples on
> these type ..
> 
> regards,
> vijay .
> 


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

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