<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Dirk,</div><div><br></div><div>You could also try using the existing remote API with Guvnor to push up new content to the server.</div><div><br><div>Try:&nbsp;</div><div><br></div><div>1. GET <a href="http://servername:port//org.drools.guvnor.Guvnor/api/packages/{packageName}">http://servername:port//org.drools.guvnor.Guvnor/api/packages/{packageName}</a></div><div><br></div><div>To pull the list of assets from the Guvnor API for a specific package.</div><div><br></div><div>2. &nbsp;You can POST a DRL using the existing rest api like so.</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>A) Create a post request to "<a href="http://servername:port//org.drools.guvnor.Guvnor/api/packages/{YourPackageName}/{YourAssetName}">http://servername:port//org.drools.guvnor.Guvnor/api/packages/{YourPackageName}/{YourAssetName}</a>"</div><div><br></div><div>e.g., POST h<a href="ttp://servername:port//org.drools.guvnor.Guvnor/api/packages/{YourPackageName}/{YourAssetName}">ttp://servername:port//org.drools.guvnor.Guvnor/api/packages/{YourPackageName}/{YourAssetName}</a></div><div><br></div><div>B) Append your file data to the POST request as part of the request (as you would with a POST'ed file upload).</div><div><div><div><div><span class="Apple-style-span" style="font-family: arial, FreeSans, Helvetica, sans-serif; font-size: 14px; line-height: 20px; "><br></span></div></div></div></div><div><div><div><div><div>"REST" based calls are handled through two classes:</div></div></div></div></div><div><div><div><div><div><br></div></div></div></div></div><div><div><div><div><div><b><i>org.drools.guvnor.server.filesRestAPIServlet</i></b></div></div></div></div></div><div><div><div><div><div>(in the drools-guvnor module)</div></div></div></div></div><div><div><div><div><div><br></div></div></div></div></div><div><div><div><div><div>and</div></div></div></div></div><div><div><div><div><div><br></div></div></div></div></div><div><div><div><div><div><b><i>org.drools.repository.remoteapi.RestAPI</i></b></div></div></div></div></div><div><div><div><div><div>(in the drools-repository module).</div></div></div></div></div></blockquote><div><div><div><div><div><br></div><div>3. &nbsp;PUT calls handle updates to existing resources on the server, in a similar way, with DELETE allowing removal of resources.&nbsp;</div><div><br></div><div>4. &nbsp;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.&nbsp;</div><div><br></div><div>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).</div><div><div><br></div><div>There is some discussion about REST, as well, currently on the dev mailing list if you search Nabble.</div></div><div><br></div><div>A few ideas,</div><div><br></div><div>Andrew</div><div><br><div><div>On Dec 17, 2010, at 8:08 AM, dhermanns wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>Hi!<br><br>I would like to accomplish the same thing. Is there really no programmatic<br>way to do this?<br>I noticed that the files are uploaded through the eclipse-plugin using<br>webdav. Is it documented<br>what has to be done in order to install/update a drl using webdav?<br><br>Thx,<br>Dirk<br>-- <br>View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Upload-an-existing-drl-for-the-Guvnor-dynamically-tp721148p2104873.html">http://drools-java-rules-engine.46999.n3.nabble.com/Upload-an-existing-drl-for-the-Guvnor-dynamically-tp721148p2104873.html</a><br>Sent from the Drools - User mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-users<br></div></blockquote></div><br></div></div></div></div></div></div></body></html>