I think Subrahmanyam BVSS wrote: > HI All, > > I want to give the tag name in defclass construct in rule file dynamically > > So instead of following: > (defclass alertdefinition com.foo.MyClass) > > I want to use it like > (defclass (get-member RuleEngineConstants "ALERT_DEF_NAME") com.foo.MyClass)
You can build up Jess code as a string, then use the "eval" function to evaluate it: (eval (str-cat "(defclass " (RuleEngineConstants.ALERT_DEF_NAME) " com.foo.MyClass)")) Note how I've referred to the ALERT_DEF_NAME constant; in Jess 7, you can do this for static members in a class after calling "import" for that class. No more ugly "get-member" calls! --------------------------------------------------------- Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- 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] --------------------------------------------------------------------