To setup drools-server :

 1.  Download droolsjbpm-integration-distribution-5.2.0.M2.zip from drools site
 2.  extract the zip file and locate "drools-came-server-5.2.0M2.war in the 
"binaries" folder.
 3.  Copy the war to the tomcat/webapps directory
 4.  Extract the war file in webapps directory
 5.  copy your model classes and the rules file ( .drl )  into the "classes" 
folder inside this web-app
 6.  Start tomcat

I wrote a PHP client to access the rules service.

                        $url = 
"http://localhost:8090/drools-server/kservice/rest/execute";
                        $post_data = file_get_contents("drools-request-ts.xml");
                        $headers = array("Content-Type" => 'text/plain; 
charset=utf-8',"Accept" => "text/plain; charset=utf-8");
                        $rta = http_post_data($url, $post_data,array('headers' 
=> $headers ));
                        echo "Response : ".$rta;

drools-request-ts.xml  looks something like this :

<?xml version="1.0" encoding="UTF-8"?>
            <batch-execution lookup="ksession1">
         <insert out-identifier="cat0">
             <com.ts.Category>
                <categoryId>1</categoryId>
                <categoryName>Area</categoryName>
                <parent1>0</parent1>
             </com.ts.Category>
          </insert>
         <insert out-identifier="conf">
             <com.ts.Configuration/>
          </insert>
   <fire-all-rules/>
 </batch-execution>

gudluck !


________________________________
From: [email protected] 
[mailto:[email protected]] On Behalf Of agarwalk
Sent: Wednesday, June 22, 2011 2:23 PM
To: [email protected]
Subject: [rules-users] Drools Server - Setup Issues

I am trying to setup drools server but I am running hell lot of issues. Can you 
please help me in getting latest drools server war and a sample example of how 
to write a client. This will help me a lot because it has killed my lots of 
time.
________________________________
View this message in context: Drools Server - Setup 
Issues<http://drools.46999.n3.nabble.com/Drools-Server-Setup-Issues-tp3094724p3094724.html>
Sent from the Drools: User forum mailing list 
archive<http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html> at 
Nabble.com.

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to