[rules-users] how to get the pkg from guvnor by KnowledgeAgent?

andRojs and_ma at hotmail.com
Tue Feb 19 04:36:31 EST 2013


Check if  your agent xml file is correct. I am using this one and it work
fine so far:
	String xml = "";
        xml += "<change-set
xmlns=\&quot;http://drools.org/drools-5.0/change-set\&quot;&quot;;
        xml += &quot;   
xmlns:xs=\&quot;http://www.w3.org/2001/XMLSchema-instance\&quot;&quot;;
        xml += &quot;   
xs:schemaLocation=\&quot;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\&quot;
>";
        xml += "    <add> ";
        xml += "        <resource
source=\"http://localhost:8080/guvnor-5.4.0.Final-jboss-as-7.0/rest/packages/PACKAGENAME/source\"
";
        xml += "        type=\"DRL\" basicAuthentication=\"enabled\"
username=\"admin\" password=\"admin\" />";
        xml += "    </add> ";
        xml += "</change-set>";
        
        File fxml = new File("changeset.xml");
        BufferedWriter output = new BufferedWriter(new FileWriter(fxml));
        output.write(xml);
        output.close(); 

There might be other configuration details of the agent, you can find them
here:
http://docs.jboss.org/drools/release/5.5.0.Final/drools-guvnor-docs/html_single/index.html#d0e3433

Make sure you modify the package name you are trying to acces and the
authentication details if needed. 


Good luck!!!




--
View this message in context: http://drools.46999.n3.nabble.com/how-to-get-the-pkg-from-guvnor-by-KnowledgeAgent-tp4022417p4022440.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list