Thursday, June 14, 2007

Drools v3to4 Update Tool (Edson Tirelli)

Those following our progress on building the Drools Version 4.0 know that together with all the features we are adding to the language, we also had to do some API and syntax changes that break backward compatibility.

Trying to minimize the impact of the upgrade from version 3.0.x to version 4.0, we would like to provide a tool to help upgrading the rule files (DRLs). It will do basic automated changes, but we expect to minimize with it any possible pain users would face when doing everything by hand.

I just committed a few lines of code of an application to do it and you can check it out from the link:

http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/experimental/drools-update/

Right now, the only action implemented is to replace the calls to assert, assertLogical and modify into calls to insert, insertLogical and update, but we expect to grow it to cover any other syntax incompatibilities. For example, resolving binding types to know when to remove old calls to primitive "unwrap" method calls, like .intValue(), etc.

Any one willing to help with the task is welcome. Just join us at the IRC or mailing list.

Happy drooling.
Share/Bookmark