IDK if we have a REST method to delete an asset.<br><br>Jervis might be able to advise.. I've pinged him.<br><br><div class="gmail_quote">On 29 January 2013 10:47, benq2188 <span dir="ltr"><<a href="mailto:bengisaglam@gmail.com" target="_blank">bengisaglam@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Mike,<br>
<br>
My UI needs to be able to edit/delete/insert rules authored, and rules<br>
authored in my UI won't also be edited in Guvnor by users, user will<br>
interact and do all modification and creation through my UI but we are<br>
planning to author our users using Guvnor. Thats why I confused in which<br>
asset type format should I store rules regarding to authentication issue.<br>
<br>
Apart from this, I followed the documentation and succeed put and get a DRL<br>
via REST, but could not manage to create and delete a DRL via REST API , if<br>
you have some useful link or sample code for it I would appreciate.<br>
<br>
Thanks in advance,<br>
<br>
Bengi.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
manstis wrote<br>
<div class="im">> Hello,<br>
><br>
> If your UI needs to be able to edit existing rules authored with it then<br>
> you'll need to convert from the persistent format back to whatever model<br>
> your UI uses.<br>
><br>
> Guvnor already has this, as you have found, with it's *internal* BRL<br>
> format<br>
> and related classes. Guvnor stores RuleModel as XML (XStream of RuleModel)<br>
> and uses this for it's UI.<br>
><br>
> When Guvnor needs DRL (e.g when building a package or when the users wants<br>
> to view the source) it uses BRDRLPersistence to translate RuleModel to<br>
> DRL.<br>
><br>
> Will rules authored in your UI also be editable in Guvnor - in which case<br>
> use of BRL would also be a good choice.<br>
><br>
> Guvnor 6.0 might have the ability to round-trip between DRL and RuleModel<br>
> removing BRL altogether. If you elect to pursue this then storing the Rule<br>
> from your UI as DRL could also work provided your UI used RuleModel.<br>
><br>
> With kind regards,<br>
><br>
> Mike<br>
><br>
</div>> On 29 January 2013 09:38, benq2188 &lt;<br>
<br>
> bengisaglam@<br>
<div><div class="h5"><br>
> &gt; wrote:<br>
><br>
>> Thanks for the reply,<br>
>><br>
>> It seems with this way I need to create my own rule parser to have "DRL"<br>
>> type asset since the rules will be created by users.<br>
>><br>
>> My aim is to facilitate from Guvnor api as much as I can, instead of<br>
>> creating my parser I though that there might be some class which helps to<br>
>> create rules. For now I havent decided yet between "BRL" or "DRL" type<br>
>> asset<br>
>> to create rules, from customized UI the output should be the rule itself<br>
>> and<br>
>> I need to POST it by using REST API. So in this point what do you<br>
>> suggest?<br>
>> Do you think org.drools.ide.common.client.modeldriven.brl.RuleModel class<br>
>> may an option to represent rules which are created by users?(and after<br>
>> that<br>
>> persisting them using BRDRLPersistance class to store in guvnor<br>
>> repository<br>
>> via REST) or instead, could it be an option to create "BRL" type asset<br>
>> from<br>
>> my UI using guvnor API?<br>
>><br>
>> Please<br>
>><br>
>> Regards,<br>
>><br>
>> Bengi.<br>
>><br>
>><br>
>><br>
>><br>
>> manstis wrote<br>
>> > DRL assets in Guvnor are stored as plain text.<br>
>> ><br>
>> > You should be able to use the REST API to create a new "DRL" type asset<br>
>> > and<br>
>> > POST the text.<br>
>> ><br>
>> > On 29 January 2013 08:40, Esteban Aliverti &lt;<br>
>><br>
>> > esteban.aliverti@<br>
>><br>
>> > &gt;wrote:<br>
>> ><br>
>> >> As far as I know, there is no API for DRL creation.<br>
>> >><br>
>> >> Best Regards,<br>
>> >><br>
>> >><br>
>> >> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>
>> >><br>
>> >> Esteban Aliverti<br>
>> >> - Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
>> >><br>
>> >><br>
>> >> On Mon, Jan 28, 2013 at 2:32 PM, benq2188 &lt;<br>
>><br>
>> > bengisaglam@<br>
>><br>
>> > &gt; wrote:<br>
>> >><br>
>> >>> Esteban thanks for the quick reply, so in this case my question is,<br>
>> >>> which<br>
>> >>> object is the key in the API to create .drl rule ? Should I create<br>
>> >>> RuleModel?<br>
>> >>><br>
>> >>> Also how can I store that .drl via POST method of the REST?<br>
>> >>><br>
>> >>> Regards,<br>
>> >>><br>
>> >>> Bengi.<br>
>> >>><br>
>> >>><br>
>> >>> Esteban wrote<br>
>> >>> > If you are not planning to use Guvnor to author your rules, there<br>
>> is<br>
>> >>> no<br>
>> >>> > need to store them in BRL format. You can store your rules as<br>
>> >>> 'technical<br>
>> >>> > rules' directly.<br>
>> >>> ><br>
>> >>> > Best Regards,<br>
>> >>> ><br>
>> >>> ><br>
>> >>> > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>
>> >>> ><br>
>> >>> > Esteban Aliverti<br>
>> >>> > - Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
>> >>> ><br>
>> >>> ><br>
>> >>> > On Mon, Jan 28, 2013 at 2:10 PM, benq2188 &lt;<br>
>> >>><br>
>> >>> > bengisaglam@<br>
>> >>><br>
>> >>> > &gt; wrote:<br>
>> >>> ><br>
>> >>> >> Hi everyone,<br>
>> >>> >><br>
>> >>> >> I would like to implement an Expert System which I can have my own<br>
>> UI<br>
>> >>> to<br>
>> >>> >> generate user defined rules, and I am planning to use REST API to<br>
>> >>> >> insert/update/delete the rules,which are in the guvnor repository.<br>
>> >>> Inside<br>
>> >>> >> the guvnor, I would like to store my rules in .drl format. So I<br>
>> was<br>
>> >>> >> wondering two thing:<br>
>> >>> >><br>
>> >>> >> - Is that possible to create a brl file in XStream xml format as<br>
>> >>> output<br>
>> >>> >> of<br>
>> >>> >> the UI, and store it in the repository as .drl format?. (I know<br>
>> the<br>
>> >>> >> conversion from .brl to .drl is possible by using BRDRLPersistance<br>
>> >>> >> object.)<br>
>> >>> >> If it is possible then which object is the key point to create it<br>
>> >>> from<br>
>> >>> >> the<br>
>> >>> >> "package org.drools.ide.common.client.modeldriven.brl"?<br>
>> >>> >><br>
>> >>> >> -Another problem, by using REST API I can update and retrieve an<br>
>> >>> asset<br>
>> >>> in<br>
>> >>> >> text/plain format, however I could not succeed to insert new asset<br>
>> >>> into<br>
>> >>> >> repository by using POST method. So how can I insert a new .drl<br>
>> rule<br>
>> >>> into<br>
>> >>> >> repository via REST.<br>
>> >>> >><br>
>> >>> >> I will appreciate if you have some sample code for any of them and<br>
>> >>> will<br>
>> >>> >> be<br>
>> >>> >> greatful for any help,<br>
>> >>> >><br>
>> >>> >> Thanks,<br>
>> >>> >><br>
>> >>> >> Bengi.<br>
>> >>> >><br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> --<br>
>> >>> >> View this message in context:<br>
>> >>> >><br>
>> >>><br>
>> <a href="http://drools.46999.n3.nabble.com/Custom-UI-to-create-rules-and-inserting-them-via-REST-API-tp4021848.html" target="_blank">http://drools.46999.n3.nabble.com/Custom-UI-to-create-rules-and-inserting-them-via-REST-API-tp4021848.html</a><br>
>> >>> >> Sent from the Drools: User forum mailing list archive at<br>
>> Nabble.com.<br>
>> >>> >> _______________________________________________<br>
>> >>> >> rules-users mailing list<br>
>> >>> >><br>
>> >>><br>
>> >>> > rules-users@.jboss<br>
>> >>><br>
>> >>> >> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>> >>> >><br>
>> >>> ><br>
>> >>> > _______________________________________________<br>
>> >>> > rules-users mailing list<br>
>> >>><br>
>> >>> > rules-users@.jboss<br>
>> >>><br>
>> >>> > <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>> >>><br>
>> >>><br>
>> >>><br>
>> >>><br>
>> >>><br>
>> >>> --<br>
>> >>> View this message in context:<br>
>> >>><br>
>> <a href="http://drools.46999.n3.nabble.com/Custom-UI-to-create-rules-and-inserting-them-via-REST-API-tp4021848p4021851.html" target="_blank">http://drools.46999.n3.nabble.com/Custom-UI-to-create-rules-and-inserting-them-via-REST-API-tp4021848p4021851.html</a><br>
>> >>> Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
>> >>> _______________________________________________<br>
>> >>> rules-users mailing list<br>
>> >>><br>
>><br>
>> > rules-users@.jboss<br>
>><br>
>> >>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>> >>><br>
>> >><br>
>> >><br>
>> >> _______________________________________________<br>
>> >> rules-users mailing list<br>
>> >><br>
>><br>
>> > rules-users@.jboss<br>
>><br>
>> >> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>> >><br>
>> >><br>
>> ><br>
>> > _______________________________________________<br>
>> > rules-users mailing list<br>
>><br>
>> > rules-users@.jboss<br>
>><br>
>> > <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> View this message in context:<br>
>> <a href="http://drools.46999.n3.nabble.com/Custom-UI-to-create-rules-and-inserting-them-via-REST-API-tp4021848p4021911.html" target="_blank">http://drools.46999.n3.nabble.com/Custom-UI-to-create-rules-and-inserting-them-via-REST-API-tp4021848p4021911.html</a><br>
>> Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
>> _______________________________________________<br>
>> rules-users mailing list<br>
>><br>
<br>
> rules-users@.jboss<br>
<br>
>> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
>><br>
><br>
> _______________________________________________<br>
> rules-users mailing list<br>
<br>
> rules-users@.jboss<br>
<br>
> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
</div></div>View this message in context: <a href="http://drools.46999.n3.nabble.com/Custom-UI-to-create-rules-and-inserting-them-via-REST-API-tp4021848p4021918.html" target="_blank">http://drools.46999.n3.nabble.com/Custom-UI-to-create-rules-and-inserting-them-via-REST-API-tp4021848p4021918.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br>