[rules-users] Setting category tags programmatically

Jervis Liu jliu at redhat.com
Tue Oct 11 23:42:17 EDT 2011


On 2011/10/12 1:10, gab wrote:
> Hi all,
> my application needs several hundreds rules to implement its business logic.
> We generated such rules from a legacy database using a few sql scripts,
> since the relevant tables contained the business configuration constraints
> for the app, and then added them to Guvnor by means of the eclipse plugin.
>
> Is it possible to set category tags programmatically for that rules
> artifacts in Guvnor? Possibly a script or some java api?
You can do this through REST service: 
https://hudson.jboss.org/jenkins/job/guvnor/lastSuccessfulBuild/artifact/guvnor-docs/target/docbook/publish/en-US/html_single/index.html#d0e1856

Basically what you need to do is to send a HTTP GET request to retrieve 
asset metadata (in which the category info is not set yet), then send a 
PUT request to update asset metadata with category set to the value you 
want. Please take a look at this test:
https://github.com/droolsjbpm/guvnor/blob/master/guvnor-webapp/src/test/java/org/drools/guvnor/server/jaxrs/AssetPackageResourceTest.java

Cheers,
Jervis
> Thanks in advance,
> Gab
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/Setting-category-tags-programmatically-tp3413214p3413214.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list