[rules-users] RESTful Example
All, First, I apologize long email. I have a few questions on how to use RESTful web Service on Execution Server. I have read through the document and followed the instruction. I think I missed a few critical steps. Here are what I did. 1) Created package, category, rule, a java class (Referral as fact). Class Referral { String homeState; String servviceType; String stateLicenseNumber; ... } 2) Used Test Scenarios tool to test rule. Everything worked perfectly. 3) Installed Execution Server in JBoss. 4) Added a mytest.properties file under \drools-5.0-guvnor-standalone\jboss-4.2.3.GA\server\default\deploy\drools-server.war\WEB-INF\classes\ http://localhost:8080/DroolsDemo_sfasdfasd.pkg type='PKG' /> 5) Add jar file for above java class in lib directory. 6) Created java class to call mytest RESTful service. PostMethod method = new PostMethod("http://localhost:8080/drools-server/knowledgebase/mytest";); method.setRequestHeader("Cache-Control", "no-cache"); method.setRequestHeader("Accept","text/xml"); method.setRequestHeader("Content-Encoding","UTF-8"); try{ File f = new File("Request.xml"); method.setRequestBody(new FileInputStream(f)); }catch(Exception e){ } Request.xml content is: testFact FL HH I got RuleBase mytest not known or is not valid. Here are my questions: 1) Did I miss any other steps? Anything I did wrong? 2) If I run execution server on different server, where I should put pkg file and how to make necessary changes to mytest.properties? Sorry for long email. Appreciate your help and Happy Holidays. Tony CONFIDENTIALITY NOTICE: The information in this electronic transmission and any documents accompanying it may contain confidential and privileged information intended for use by the individual or entity that is the intended recipient. If you have received this message in error or due to an unauthorized transmission or interception, please delete all copies from your system without disclosing, copying, or transmitting this message and notify us by telephone 877TELLUS9 or by electronic mail servicecomme...@progressive-medical.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools 5.0 Guvnor install
I had some issue. The instruction says you need to replace a few jars files (you can download it from Drools web site). But I still cannot make it work (GlassFish). I used standalone right now. There are two books out there. Can anyone tell us which one is better or covers most recent features in 5.0? Also, I'm looking for examples of using RestFul Web Service (both Java and Perl). Any help is really appreciated. Thanks, Tony -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Sahid Khan (?) Sent: Tuesday, November 24, 2009 7:21 AM To: Rules Users List Subject: Re: [rules-users] Drools 5.0 Guvnor install On Tue, Nov 24, 2009 at 5:40 PM, SzA84 wrote: > And it says "you should navigate to http://localhost/drools-jbrms and check > that Guvnor appears", but it doesn't work, although the server is running. > I think request url should be http://localhost/drools-guvnor -- S. Argue with idiots, and you become an idiot. - PG ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users CONFIDENTIALITY NOTICE: The information in this electronic transmission and any documents accompanying it may contain confidential and privileged information intended for use by the individual or entity that is the intended recipient. If you have received this message in error or due to an unauthorized transmission or interception, please delete all copies from your system without disclosing, copying, or transmitting this message and notify us by telephone 877TELLUS9 or by electronic mail servicecomme...@progressive-medical.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] RestFule example
All, I have installed Drools Execution Server and try to figure out how to use execution server as stateless web service. I have a few questions: 1) I checked out the all examples in the document. I didn't see any examples using RestFul web service. Is there any example out there? 2) By looking at the Sample request content and response content, I cannot figure out what this example tries to tell us. Detail explanation would be really appreciated, especially for new user. 3) In the example, which part works as 'fact Model' (inOutFacts, inFacts), the data we try to apply rule on? What is inFacts used for? 4) If I only need to apply rule to a single object, how do I use restful web service? For example, I have an object Model Person { firstName LastName Gender } My rule is to check the first name. If first name is "Jenny", set gender to "F" and return the Person Object. How can I use Drools Execution Server to do that? (Of cource I have to deploy knowledgebase generated from Guvnor first). Thanks, Tony CONFIDENTIALITY NOTICE: The information in this electronic transmission and any documents accompanying it may contain confidential and privileged information intended for use by the individual or entity that is the intended recipient. If you have received this message in error or due to an unauthorized transmission or interception, please delete all copies from your system without disclosing, copying, or transmitting this message and notify us by telephone 877TELLUS9 or by electronic mail servicecomme...@progressive-medical.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] test scenario in Guvnor
All, I followed an example and created test scenario in Guvnor. However, I always got 'no rule was fired ' even then I specified rule(s) in the test scenario. Am I missing something? Btw, how to set java as default dialect in rules? Appreciate your help. Tony CONFIDENTIALITY NOTICE: The information in this electronic transmission and any documents accompanying it may contain confidential and privileged information intended for use by the individual or entity that is the intended recipient. If you have received this message in error or due to an unauthorized transmission or interception, please delete all copies from your system without disclosing, copying, or transmitting this message and notify us by telephone 877TELLUS9 or by electronic mail servicecomme...@progressive-medical.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] No Guided DSL Rule Editor
I'm currently evaluating Drools as Rules Engine for our Company. I'm kind of struggling with using Guvnor to create rule. I created two fact models, one by uploading jar file and another using declarative model. When I tried to create rules, I don't see DSL Business Rule (Guided Editor) in the drop down list. I only have following in drop down list. (I'm using drools-5.0-guvnor-standalone). Business Rule (Guided editor) DSL Business Tule (Text editor) DRL Rule (Technical rule -text editor) Decision Table (Spreadsheet) Decision Table (Web -guided editor) >From Business Rule (Guided editor), I have only "There is no", "There >Exists" and "Any of" for condition and 'insert fact' and 'Logically insert >fact' choice for action. Did I miss something? Thanks, Tony CONFIDENTIALITY NOTICE: The information in this electronic transmission and any documents accompanying it may contain confidential and privileged information intended for use by the individual or entity that is the intended recipient. If you have received this message in error or due to an unauthorized transmission or interception, please delete all copies from your system without disclosing, copying, or transmitting this message and notify us by telephone 877TELLUS9 or by electronic mail servicecomme...@progressive-medical.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users