[rules-users] How to access Guvnor Rules based on versions from Java?

Ravikiran ravikiran.kakarla at gmail.com
Tue Oct 16 07:47:19 EDT 2012


Hi Jarvis,

Thanks for your reply. Looks like i have posted my intension unclearly. To
elaborate bit more, currently i am using Rest API to create KnowledgeBase
from my java client. I have changeset-loans.xml, where my guvnor package
with drl is defined. My java client will this to fire all rules of that
package. In such a case, when i have more one version created for the
package and the rule assets within it, how i can i call specific version
based package along with the drl file to fire all the rule assets belongs to
it? In the same passion, is there any way i can mentioned the rule asset
name in the changeset xml file to fire specific version of rule asset from
java?

I can only get the package or rule asset's metadata using the urls that you
have mentioned in your post. But i can't fire the rules...please suggest if
i am doing something wrong.

changeset-loans.xml
-------------------------
<change-set xmlns='http://drools.org/drools-5.0/change-set'
    xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
    xs:schemaLocation='http://drools.org/drools-5.0/change-set
   
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd'
>
   <add>
      <resource
     
source='http://localhost:9080/guvnor-5.2.0.Final-tomcat-6.0/org.drools.guvnor.Guvnor/package/loans/loans_demo.drl'
      type='DRL' basicAuthentication="enabled" username="admin"
password="admin" />
   </add>
</change-set>

Thanks
Ravi



--
View this message in context: http://drools.46999.n3.nabble.com/How-to-access-Guvnor-Rules-based-on-versions-from-Java-tp4020285p4020301.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list