The simplest solution would be to leverage RuleBuilder as you do at runtime.
 
Pass the user's rules through there before persisting to the database - reporting errors to the user etc accordingly.


From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Kevin Delcroix
Sent: 23 November 2007 14:19
To: rules-users@lists.jboss.org
Subject: [rules-users] How to check to rules syntax before runtime?

Hi everyone,

 

I would like to check if the rules syntax is correct before the rule runtime. In fact, the end-user is the one which edits the rules and saves them into the database. At a specific moment, the rules code is loaded and executed. But for the moment, the rules the end-user typed are not checked before the runtime of the rules.

 

So I would like to check the rules syntax when the end-user validates the rules pseudo-code and show him if there are errors in his rule code.

 

Don’t hesitate to ask me if it’s not clear enougth.

 

Thanks in advance for your help.

 

Kevin