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: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of agarwalk
Sent: Wednesday, June 22, 2011 2:23 PM
To: rules-users@lists.jboss.org
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
Sent from the Drools: User forum mailing list archive at Nabble.com.


This message contains information that may be privileged or confidential and is the property of the KPIT Cummins Infosystems Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Cummins Infosystems Ltd. does not accept any liability for virus infected mails.