Re: [rules-users] Guvnor rule validation using Java Code?
you can write something like on knowledgebuidler private void validateKnowledgeBuilder(KnowledgeBuilder knowledgeBuilder) throws KnowledgeBuilderValidationException { if (knowledgeBuilder.hasErrors()) { for (KnowledgeBuilderError error : knowledgeBuilder.getErrors()) { LOGGER.log(ZulaLevel.SEVERE, LogMessageIds.MSGID007, error .getMessage()); } throw new KnowledgeBuilderValidationException(); } } - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/Guvnor-rule-validation-using-Java-Code-tp4021291p4021331.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor rule validation using Java Code?
You can get the whole source code of the pkg (drl) an the model (jar) from Guvnor using rest and then you could try to compile the package in your app using Drools APIs. That is what Guvnor does. Best regards, On Jan 2, 2013 8:59 AM, "arup" wrote: > Thanks for your replies. > > Here is my requirement. > > We are developing an application where we can interact with Guvnor using > REST API. We will use this application only to manage rules not the Guvnor. > Now is there any way to validate the rules or validate the whole package as > we do in Guvnor while building the package? For now I have created few > methods to check the syntax errors in a rule. But I need drools based > validation. like validating a rule depending on it's Pojo model, validating > import and global, rule condition and action parts etc. just as we do in > IDE > by clicking validate. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Guvnor-rule-validation-using-Java-Code-tp4021291p4021329.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor rule validation using Java Code?
Thanks for your replies. Here is my requirement. We are developing an application where we can interact with Guvnor using REST API. We will use this application only to manage rules not the Guvnor. Now is there any way to validate the rules or validate the whole package as we do in Guvnor while building the package? For now I have created few methods to check the syntax errors in a rule. But I need drools based validation. like validating a rule depending on it's Pojo model, validating import and global, rule condition and action parts etc. just as we do in IDE by clicking validate. -- View this message in context: http://drools.46999.n3.nabble.com/Guvnor-rule-validation-using-Java-Code-tp4021291p4021329.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor rule validation using Java Code?
drools-verifier can be used from.regular Java code; it is simply a Java library. Documentation and examples are however a little sparse, why not explain your requirement a little more first? sent on the move On 26 Dec 2012 11:35, "bharadwaj2012" wrote: > The best anwer for your question is to create jnuit test cases for you > rules. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Guvnor-rule-validation-using-Java-Code-tp4021291p4021294.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor rule validation using Java Code?
The best anwer for your question is to create jnuit test cases for you rules. -- View this message in context: http://drools.46999.n3.nabble.com/Guvnor-rule-validation-using-Java-Code-tp4021291p4021294.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Guvnor rule validation using Java Code?
Hi All, I have a requirement where I need to validate my rules mainly drls from java code without using guvnor interface. Is there any way to do that? Any king of validation in Package level is also acceptable. Thanks in Advance. -- View this message in context: http://drools.46999.n3.nabble.com/Guvnor-rule-validation-using-Java-Code-tp4021291.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users