Tuesday, May 06, 2008

A REST API for Drools

Part of the work for the Drools 5 repository is a Rest API - to allow content to be accessed remotely. The initial purpose of this is to let assets in the repository be synced with files in a developers workspace.

Rest turns out to be a perfect fit, we have the usual verbs:

PUT: update content (create a new version).
POST: create a new asset
DELETE: delete an asset
GET: retrieve asset content, or package listing

All actions are of course in the context of a package - but this is all specified by the url:

http:///api/packages//

So for instance, doing a PUT to: http:///api/packages/SomePackage/SomeAsset.drl will update the content of the SomeAsset.drl.

This may be terribly useful to some, terribly un-interesting to others, but at the very least people should appreciate the ability to get and update content to files/workspace from the repository without error prone import processes.

7 comments:

  1. Nice addition to the BRMS. I've been using 4.01 and will be happy to sunset my custom servlet for accessing repository info. Thanks!

    ReplyDelete
  2. To be able to access the rules you created in Eclipse using BRMS and to edit them and sync the changes are such important features...just like the Jrules do!!!! our business users are very interested in that possiblity...we are waiting for the new release of Drools...keep the good work!

    ReplyDelete
  3. Work has started on a sync plugin for eclipse and Guvnor, the BRMS. It won't make 5.0 though, but should be in 5.1 for the end of this year.

    ReplyDelete
  4. Having suffered through webservices on multiple platforms, it's good the BRMS is using REST.

    ReplyDelete
  5. I think this is an important addition to the BRMS from a rule developer's perspective. One of the issues I've always disliked about using the BRMS to create rules is that if you are in the middle of editing a rule and have to stop for any reason, then you end up saving partially finished rules in the repository i.e. saving is treated the same as a cvs/svn commit, thus leaving your rules repository in a potentially un-buildable state for other users. Allowing a working version of the rules in your Eclipse environment that can be synced with the BRMS would be great, and more natural from a developer's perspective.

    ReplyDelete
  6. I am trying to open Guvnor Perspective in eclipse 3.3.For that i am using two plugins 1)org.guvnor.tools and 2)org.eclipse.webdav.The Gunor Repository Exploring icon is coming in the perspective list.But while trying to open, i am getting an error message "Problem opening perspective".Can anybody please guide me to solve this.

    ReplyDelete
  7. You won't get technical help here, try the USER mailing list as details here. Please make sure you fully read the page, so that you get the best out of mailing lists:
    http://www.jboss.org/drools/lists.html

    ReplyDelete