[rules-users] So can you automatically upload a POJO JAR Model or not?

Mark Bennett mark.bennett at lucidworks.com
Fri Aug 16 10:58:54 EDT 2013


Hi guys,

I'm using 5.5, and I've looked around and around on Google, and although I've seen a few claims that this might work, so far I haven't had any luck.  I'm getting various errors, 404 no such page, also "service not available".

I do pass in the authentication header.  I'm also making sure to generate Java 1.6 classes, and the UI accepts the JAR without complaint and exposes it in the UI.

I saw one post claiming to upload as an asset, but there was some code change required to Drools/Guvnor to get it to treat it as a model, so that's not an option.


Let me try a few simple questions that might narrow this down:

* Would you expect to use the REST API or the Webdav API to upload?

* What would the URL look like?  (I've tried a bunch, looks simple enough online, and I'm able to download the DRLs)

* I downloaded the combo pack of JBoss and Drools/Guvnor 5.5.  Is there maybe some config change needed to enable the additional REST or Webdav URLs?

* When you submit a JAR interactively, I know GWT is involved, but does it hand over the request to either the REST or Webdav API?  OR does it have some other special entrance into the system, some third way in?  And if so, could I use that?

* Would I use a POST or a PUT?  The theory seems to be use POST if it's new, or PUT if it's an update, but neither has worked.

* What mime type would you use?  The 3 ideas were octet-stream, multipart or java jar (not the exact syntax)

* Would I shove just the bytes of the jar file, or do I need multipart and also include some type of XML file as well?

* Is it OK to just write the raw bytes of the jar, or do I need to encode them?

* Assuming I could upload a JAR, would I then also need to issue some type of "commit", the way the UI does?

* Do you agree that this should be possible to test with curl?  (to eliminate Java coding and library differences as the problem)

* Instead of a JAR, is there some other fact model / syntax that I can automatically generate and upload?  I get the impression there is, but neither the doc nor the 3 books seem very specific, I haven't seen a full example of this.

* Generally, for dynamic models driven by external systems, what is the "Best Practice" for telling the Guvnor UI about the model?  Maybe I'm going about this all wrong?

* Does Drools 6 and the new Guvnor replacement suddenly make this much easier?


I've been looking around and experimenting for about a week now so I'm running out of ideas.

Thanks,
Mark

--
Mark Bennett / LucidWorks: Search & Big Data / mark.bennett at lucidworks.com
Office: 408-898-4201 / Telecommute: 408-733-0387 / Cell: 408-829-6513




More information about the rules-users mailing list