Re: [rules-users] Guvnor and Axis2
Hi, thanks for the reply. I had it already done. Because of its the better way to interact with guvnor. Mario Am 01.10.2011 04:08, schrieb jliu: On 2011/9/29 15:46, Mario Viertel wrote: Hi, I am using an own web service (Axis2; tomcat 6) to interact with Guvnor. All drools related jars (drools*, mvel*, knowledge-api) are contained in the lib folder of service's aar file. Via knowledge-api the service interacts with the guvnor repository. Unfortunately this doesn't work. At runtime a ClassNotFoundException has been thrown. A look into details revealed that the ClassLoader havn't loaded all jars containing in webservice's lib folder. Has anybody an idea what's going wrong. I'm not sure if this is an issue of drools, the axis2 engine or the tomcat engine. Its very hard to tell what the problem is based on the information you provided. I would suggest you to use Guvnor REST API to interact with Guvnor: [1]. [1]. https://hudson.jboss.org/jenkins/job/guvnor/lastSuccessfulBuild/artifact/guvnor-docs/target/docbook/publish/en-US/html_single/index.html#d0e1856 Hope this helps, Jervis Thanks, Mario ___ 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 -- Mit freundlichen Gruessen Mario Viertel RMS - Radio Monitoring and Surveillance Solutions BIS - Business and Intelligence Solutions Tel: +49 9131 583 510 Fax: +49 9131 583 11 Mail: mario.vier...@medav.de Skype: mavi-medav Betriebsstaette Ilmenau Homburger Platz 3 98693 Ilmenau _ MEDAV GmbH Graefenberger Str. 32-34 D-91080 Uttenreuth Geschaeftsfuehrer Dr.-Ing. Hans-Joachim Kolb Handelsregister Fuerth HRB 2311 Bankverbindung Stadt- und Kreissparkasse Erlangen BLZ 763 500 00, KtNr. 10 - 000 344 Internet http://www.medav.de Angaben gemaess EHUG vom 10.11.2006 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Guvnor and Axis2
Hi, I am using an own web service (Axis2; tomcat 6) to interact with Guvnor. All drools related jars (drools*, mvel*, knowledge-api) are contained in the lib folder of service's aar file. Via knowledge-api the service interacts with the guvnor repository. Unfortunately this doesn't work. At runtime a ClassNotFoundException has been thrown. A look into details revealed that the ClassLoader havn't loaded all jars containing in webservice's lib folder. Has anybody an idea what's going wrong. I'm not sure if this is an issue of drools, the axis2 engine or the tomcat engine. Thanks, Mario ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] [guvnor] How to use a rule in a java application
Hi all, I am new in Guvnor and have a lot of questions. I have created a decision table with the Guvnor web app. I have also created some test. All seems to be fine. Now I want to use the rules in a web application. Unfortunately Guvnor doesn't provide a web service interface so I must develop an own web service to deal with the rules. But thats not so easy ... In the Guvnor documentation I can see how to create KnowledgeBases and builders and how to fire rules. But I cannot see how to receive rule results. Example: The decision table looks similar like this: rule 1 under age if person.age 18 then under age rule 2 pensioner female if person.age 64 and person.gender == female then pensioner rule 3 pensioner male if person.age 67 and person.gender == male then pensioner rule 4 full age * then full age In my java application I create a person object: Person p = new Person(); p.setBirthday(...); p.setGender(...); Now I miss a method in the Guvnor api to exectute the rules and receive the result like this: Person result = (Person) rules.execute(p); Can somebody explain how to execute a rule and receive the result. Thanks in Advance Mario Viertel Germany ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] [guvnor] How to use a rule in a java application
Hi Mike, thanks for the information. No, I didn't know the Expert documentation. Regards, Mario Am 20.04.2011 14:09, schrieb Michael Anstis: Hi, Guvnor is an authoring and repository environment not a runtime environment. Please read about KnowledgeBuilder and its related addResource methods together with the ResourceType.PKG. You can also look at using KnowledgeAgent but for now an understanding of KnowledgeBuilder will suffice. I also recommend you read about rule invocation, as your example of how you expect operation rules.execute suggests you have not read the Expert documentation. With kind regards, Mike On 20 April 2011 12:39, Mario Viertelmario.vier...@medav.de wrote: Hi all, I am new in Guvnor and have a lot of questions. I have created a decision table with the Guvnor web app. I have also created some test. All seems to be fine. Now I want to use the rules in a web application. Unfortunately Guvnor doesn't provide a web service interface so I must develop an own web service to deal with the rules. But thats not so easy ... In the Guvnor documentation I can see how to create KnowledgeBases and builders and how to fire rules. But I cannot see how to receive rule results. Example: The decision table looks similar like this: rule 1 under age if person.age 18 then under age rule 2 pensioner female if person.age 64 and person.gender == female then pensioner rule 3 pensioner male if person.age 67 and person.gender == male then pensioner rule 4 full age * then full age In my java application I create a person object: Person p = new Person(); p.setBirthday(...); p.setGender(...); Now I miss a method in the Guvnor api to exectute the rules and receive the result like this: Person result = (Person) rules.execute(p); Can somebody explain how to execute a rule and receive the result. Thanks in Advance Mario Viertel Germany ___ 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 -- Mit freundlichen Gruessen Mario Viertel RMS - Radio Monitoring and Surveillance Solutions BIS - Business and Intelligence Solutions Tel: +49 9131 583 510 Fax: +49 9131 583 11 Mail: mario.vier...@medav.de Skype: mavi-medav Betriebsstaette Ilmenau Homburger Platz 3 98693 Ilmenau _ MEDAV GmbH Graefenberger Str. 32-34 D-91080 Uttenreuth Geschaeftsfuehrer Dr.-Ing. Hans-Joachim Kolb Handelsregister Fuerth HRB 2311 Bankverbindung Stadt- und Kreissparkasse Erlangen BLZ 763 500 00, KtNr. 10 - 000 344 Internet http://www.medav.de Angaben gemaess EHUG vom 10.11.2006 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users