Drools setup

Before we start

Drools is a Business Rules Management System (BRMS) solution. It provides a core Business Rules Engine (Kie-Server), a web authoring and rules management application (Kie-Workbench) and an Eclipse IDE plugin for core development.

kie-workbench is a UI and allows following

  • Creation of a project/container
  • Creation of rule or guided rule
  • Creation of data objects which are like POJO objects.
  • Deploy created project/container to kie-server.

kie-server is component which

  • Accepts REST requests to manage or execute containers/rules

This document will explain how to setup drools(kie-server and kie-workbench) and how to create rules and container and deploy them onto kie-server and execute rules using REST interface.



Drools can be deployed on any web server either on windows or Linux. This document is going to cover the procedure with a Linux environment with 6.3.0-final version of drools. Windows setup is also similar.

We will need to have tomcat8 and then install kie-server and kie-workbench on this instance of tomcat server.

  1. Download tomcat8 from here and unzip it into a desirable location. Once done set variable TOMCAT_HOME as the path to this extracted folder which contains bin.
  3. Download war files for kie-server-6.3.0.Final-webc.war from here and kie-wb-distribution-wars-6.3.0.Final-tomcat7.war from here.
  4. Place the war files in $TOMCAT_HOME/webapps and rename them to kie-server.war and kie-wb.war respectively
  5. Download following jars into $TOMCAT_HOME/lib
    1. btm-2.1.4
    2. btm-tomcat55-lifecycle-2.1.4
    3. h2-1.3.161
    4. jacc-1.0
    5. jta-1.1
    6. kie-tomcat-integration-6.3.0.Final
    7. slf4j-api-1.7.2
    8. slf4j-jdk1
  6. Create bitronix config file $TOMCAT_HOME/conf/btm-config.properties with following content


  7. Create $TOMCAT_HOME/conf/propertieswith following content


  8. Create two users. Kieserver to access kie-server and workbench user to access kie-workbench. Edit $TOMCAT_HOME/conf/tomcat-users.xmland add this content inside <tomcat-users>

    <role rolename=”admin”/>
    <role rolename=”analyst”/>
    <role rolename=”user”/>
    <role rolename=”kie-server”/>
    <user username=”workbench” password=”workbench1!” roles=”admin,kie-server”/>
    <user username=”kieserver” password=”kieserver1!” roles=”kie-server”/>

  9. Create a file $TOMCAT_HOME/bin/setenv.shwith following content

    CATALINA_OPTS=”-Xmx512M -XX:MaxPermSize=512m -Dbtm.root=$CATALINA_HOME -Dorg.jbpm.cdi.bm=java:comp/env/BeanManager -Dbitronix.tm.configuration=$CATALINA_HOME/conf/btm-config.properties -Djbpm.tsr.jndi.lookup=java:comp/env/TransactionSynchronizationRegistry -Djava.security.auth.login.config=$CATALINA_HOME/webapps/kie-wb/WEB-INF/classes/login.co nfig -Dorg.kie.server.persistence.ds=java:comp/env/jdbc/jbpm -Dorg.kie.server.persistence.tm=org.hibernate.service.jta.platform.internal.BitronixJtaPlatform -Dorg.kie.server.id=tomcat-kieserver -Dorg.kie.server.location=http://localhost:8080/kie-server/services/rest/server -Dorg.kie.server.controller=http://localhost:8080/kie-wb/rest/controller”

  10. Startup tomcat server by running following commands

    cd $TOMCAT_HOME/bin

  11. Check for the log file $TOMCAT_HOME/logs/catalina.out to see if there are any errors. Resolve all errors to ensure it is running fine.



  • Use your browser and hit the address <host address>:8080/kie-server/services/rest/server.
  • This should prompt for login credentials. Use kieserver and kieserver1! to login.
  • After successfully logging in a message like below should be obsereved.

    <response type=”SUCCESS” msg=”Kie Server info”>

  • Similarly to verify kie-workbench use this address <host address>:8080/kie-wb
  • This would promt for login credentials. That should open the workbench UI.
  • Navigate to deploy >> rules deployment. In this page a server should be listed already. If not, it indicates that the kie-workbench is not able to talk to kie-server properly.
  • Once above steps are done, we have kie-server and kie-workbench setup properly.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s