[rules-users] Integration Of Guvnor with CustomApp

GPatel at tsys.com GPatel at tsys.com
Wed Dec 29 18:11:33 EST 2010


yes, I believe this should help a lot in integration. Are there going to 
be helper utilities available to unmarshal the atom, json, etc responses 
back to client-side java objects?

Thanks
Ghanshyam



From:   Jervis Liu <jliu at redhat.com>
To:     Rules Users List <rules-users at lists.jboss.org>
Cc:     rules-users-bounces at lists.jboss.org
Date:   12/26/2010 11:50 PM
Subject:        Re: [rules-users] Integration Of Guvnor with CustomApp
Sent by:        rules-users-bounces at lists.jboss.org



GPatel at tsys.com wrote:
> Esteban
>
> I too am trying to integrate the Rule editing widget into my web page. 
> I followed your writeup, very helpful indeed.
>
> What is missing though is a handy method to get all rules under a 
> category. In my app (and I suspect in most cases where people are 
> trying to embed the asset editor), we only want to retrieve those 
> rules that belong to the category that the web user has access to. 
> There seems to be no way of doing this in the REST API or the service 
> classes built on top of RulesRepository.
>
Hi Ghanshyam,

Once the new JAX-RS based REST interface is in place (its not there yet, 
but will come in soon), you can use following ways to retrieve rules 
under a category. For example:

A HTTP GET request to URL http://host:portnumber/repository/categories 
with Accept="application/atom+xml" returns a list of categories in the 
repository in Atom Feed format.
 
A HTTP GET request to URL 
http://host:portnumber/repository/categories/testCategory1/assets with 
Accept="application/atom+xml" returns a list of assets under the 
testCategory1 in the repository in Atom feed format.

A GET request to 
http://host:portnumber/repository/categories/testCategory1/assets/testAsset1 

with Accept="application/atom+xml" returns an atom entry which is a 
summary info of that asset as well as its meta data.

A GET request to 
http://host:portnumber/repository/categories/testCategory1/assets/testAsset1 

with Accept="application/octet-stream" returns a binary attachment (if 
that asset has a binary attachment as content).

A GET request to 
http://host:portnumber/repository/packages/testPackage1/assets/testAsset1 
with Accept="application/source" returns the asset source in text format 
(if that asset has a content in text format).

A GET request to 
http://host:portnumber/repository/packages/testPackage1/assets/testAsset1 
with Accept="application/json" returns a json object which is the 
summary info of that asset as well as its meta data.

Will this meet your requirement?

Thanks,
Jervis

> Thanks
> Ghanshyam
>
>
>
> From:        Esteban Aliverti <esteban.aliverti at gmail.com>
> To:        Rules Users List <rules-users at lists.jboss.org>
> Date:        12/23/2010 09:54 AM
> Subject:        Re: [rules-users] Integration Of Guvnor with CustomApp
> Sent by:        rules-users-bounces at lists.jboss.org
> ------------------------------------------------------------------------
>
>
>
> Andrew Waterman and Jervis Liu were working on a REST API for 
> Guvnor: _https://issues.jboss.org/browse/GUVNOR-1080_ Maybe you can 
> help them.
> In the other hand, I have implemented a way to embedd Guvnor's editors 
> in external 
> applications: 
_http://ilesteban.wordpress.com/2010/11/23/guvnor-embed-assets-editor-in-your-application/_ 
 
>
>
> Best Regards,
>
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>
> Esteban Aliverti
> - Developer @ _http://www.plugtree.com _ <http://www.plugtree.com/>
> - Blog @ _http://ilesteban.wordpress.com_ 
> <http://ilesteban.wordpress.com/>
>
>
> 2010/12/23 Harshit Bapna <_hrbapna at gmail.com_ <mailto:hrbapna at gmail.com
>>
> Hello All,
> 
> I am able to successfully integrate Guvnor into my custom app. (based 
> on spring)
> 
(_http://drools-java-rules-engine.46999.n3.nabble.com/How-to-integrate-Guvnor-GUI-in-a-test-app-td1595617.html_) 

>
> 
> I have written some code in the index.jsp which invokes the 
> ServiceImplementation of Guvnor.
> I am observing that RuleRepository object is coming as null.
> Note: Through the integrated app If I hit the Guvnor URL than it is 
> working as normal.
> 
> private ServiceImplementation getService() {
>  ServiceImplementation impl = new ServiceImplementation();
>  RulesRepository repository = impl.getRulesRepository();
>  return impl;
> }
> 
> What is the suggested way of using the Guvnor services from the 
> jsp/java ?
> 
> 
>
> _______________________________________________
> 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_
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> ----------------------------------------- The information contained in 
> this communication (including any attachments hereto) is confidential 
> and is intended solely for the personal and confidential use of the 
> individual or entity to whom it is addressed. If the reader of this 
> message is not the intended recipient or an agent responsible for 
> delivering it to the intended recipient, you are hereby notified that 
> you have received this communication in error and that any review, 
> dissemination, copying, or unauthorized use of this information, or 
> the taking of any action in reliance on the contents of this 
> information is strictly prohibited. If you have received this 
> communication in error, please notify us immediately by e-mail, and 
> delete the original message. Thank you
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



-----------------------------------------
The information contained in this communication (including any
attachments hereto) is confidential and is intended solely for the
personal and confidential use of the individual or entity to whom
it is addressed. If the reader of this message is not the intended
recipient or an agent responsible for delivering it to the intended
recipient, you are hereby notified that you have received this
communication in error and that any review, dissemination, copying,
or unauthorized use of this information, or the taking of any
action in reliance on the contents of this information is strictly
prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original
message. Thank you 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101229/60c7c421/attachment.html 


More information about the rules-users mailing list