1.2.3. Drools Update Tool

1.2.3. Drools Update Tool

The Drools Update tools is a simple program to help with the upgrade of DRL files from Drools 3.0.x to Drools 4.0.x.

Currently its main purpose is to upgrade the memory action calls from 3.0.x to 4.0.x, but future versions will conver additional scenarios. It is important to note that it does not perform a simple search and replace in the rules file, but parses the rules file to ensure it is not doing anything unexpected. For this reason it is a safe tool to use for upgrade large sets of rule files.

The drools update tool can be found as a maven project in the following Subversion source repository http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/experimental/drools-update/

To build the update tool:

  1. Checkout the Drools Update Tool Maven project from its Subversion repository:

    $ svn co http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/experimental/drools-update
    
  2. execute the maven clean install action with the project's pom.xml file

    $ mvn clean install
    

After you resolve any class path dependencies you are able to run the tool with the following command:

java -cp $CLASSPATH org.drools.tools.update.UpdateTool -f <filemask> [-d <basedir>] [-s <suffix>]

The program parameters are very easy to understand as following.