Hi Dirk,

You could also try using the existing remote API with Guvnor to push up new content to the server.


1. GET http://servername:port//org.drools.guvnor.Guvnor/api/packages/{packageName}

To pull the list of assets from the Guvnor API for a specific package.

2.  You can POST a DRL using the existing rest api like so.

A) Create a post request to "http://servername:port//org.drools.guvnor.Guvnor/api/packages/{YourPackageName}/{YourAssetName}"

e.g., POST http://servername:port//org.drools.guvnor.Guvnor/api/packages/{YourPackageName}/{YourAssetName}

B) Append your file data to the POST request as part of the request (as you would with a POST'ed file upload).

"REST" based calls are handled through two classes:

(in the drools-guvnor module)


(in the drools-repository module).

3.  PUT calls handle updates to existing resources on the server, in a similar way, with DELETE allowing removal of resources. 

4.  In terms of WebDAV, JCR also has a nice WEBDAV client implementation available that extends Apache's httpclient, but with some WEBDAV specific support built in. 

The RestAPI class in Drools-Repository has some very good detail on how this process works, and I'd suggest looking there if you have questions (on the REST API side).

There is some discussion about REST, as well, currently on the dev mailing list if you search Nabble.

A few ideas,


On Dec 17, 2010, at 8:08 AM, dhermanns wrote:


I would like to accomplish the same thing. Is there really no programmatic
way to do this?
I noticed that the files are uploaded through the eclipse-plugin using
webdav. Is it documented
what has to be done in order to install/update a drl using webdav?

View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Upload-an-existing-drl-for-the-Guvnor-dynamically-tp721148p2104873.html
Sent from the Drools - User mailing list archive at Nabble.com.
rules-users mailing list