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

Mark Bennett mark.bennett at lucidworks.com
Fri Aug 16 17:40:23 EDT 2013


Hi Nicolas,

I think you're referring to https://issues.jboss.org/browse/GUVNOR-1995  ?

Assuming I had that setup, I'm still not sure what type of curl request would submit it.

I'm looking at the code in Reply #4 on:
https://community.jboss.org/thread/213665

The "slug header" stuff is related to Atom feeds, and I know Guvnor does support that.  I'm wondering if I must use that format, and how to simulate that with plain curl or Java (I'm going to try to find the library that code uses)

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

On Aug 16, 2013, at 9:14 AM, Nicolas Héron <nicolas.heron.java at gmail.com<mailto:nicolas.heron.java at gmail.com>> wrote:

Hi,
Yes it is possible to upload a pojo jar over rest. There were commits in the 5.5.x branch  so you have to compile it yourself.
Contact me in direct if you need more info : nicolas dot heron at pymma dot com
Cheers
Nicolas


2013/8/16 Mark Bennett [via Drools] <[hidden email]<x-msg://6/user/SendEmail.jtp?type=node&node=4025583&i=0>>
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 / [hidden email]<http://user/SendEmail.jtp?type=node&node=4025580&i=0>
Office: 408-898-4201 / Telecommute: 408-733-0387 / Cell: 408-829-6513


_______________________________________________
rules-users mailing list
[hidden email]<http://user/SendEmail.jtp?type=node&node=4025580&i=1>
https://lists.jboss.org/mailman/listinfo/rules-users


________________________________
If you reply to this email, your message will be added to the discussion below:
http://drools.46999.n3.nabble.com/rules-users-So-can-you-automatically-upload-a-POJO-JAR-Model-or-not-tp4025580.html
To start a new topic under Drools: User forum, email [hidden email]<x-msg://6/user/SendEmail.jtp?type=node&node=4025583&i=1>
To unsubscribe from Drools, click here<x-msg://6/>.
NAML<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>

Nicolas Héron

________________________________
View this message in context: Re: [rules-users] So can you automatically upload a POJO JAR Model or not?<http://drools.46999.n3.nabble.com/Re-rules-users-So-can-you-automatically-upload-a-POJO-JAR-Model-or-not-tp4025583.html>
Sent from the Drools: User forum mailing list archive<http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html> at Nabble.com<http://Nabble.com>.
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org<mailto:rules-users at lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130816/89a84423/attachment.html 


More information about the rules-users mailing list