Can you share with us the log output please?<div><br></div><div>Best Regards,<br><div><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com </a><br>

- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
<br><br><div class="gmail_quote">On Fri, Jan 13, 2012 at 7:44 AM, Senthil K <span dir="ltr">&lt;<a href="mailto:kris.senthilkumar@gmail.com">kris.senthilkumar@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi,<br>
<br>
I am trying to do integration between application and guvnor. I am unable to<br>
build knowledge base using the change_set provided for the package in<br>
Guvnor. Following is the snipet of code i am using. When i try to print<br>
number of packages from knowledgebase, it shows 0.<br>
<br>
Can you help me please.<br>
<br>
<br>
                System.out.println(&quot;Before rule engine start &quot;);<br>
<br>
                String<br>
urlstr=&quot;<a href="http://192.168.2.247:8080/guvnor-5.3.0.Final-jboss-as-5.1/org.drools.guvnor.Guvnor/package/sample/LATEST/ChangeSet.xml" target="_blank">http://192.168.2.247:8080/guvnor-5.3.0.Final-jboss-as-5.1/org.drools.guvnor.Guvnor/package/sample/LATEST/ChangeSet.xml</a>&quot;;<br>


                URL url = new URL(urlstr);<br>
<br>
                KnowledgeAgentConfiguration aconf =<br>
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();<br>
                        aconf.setProperty(&quot;drools.agent.newInstance&quot;, &quot;false&quot;);<br>
                        _kagent = KnowledgeAgentFactory.newKnowledgeAgent( &quot;MyAgent&quot;,aconf );<br>
<br>
            System.out.println(&quot;after creating kagent&quot;);<br>
            _kagent.applyChangeSet(ResourceFactory.newUrlResource(url));<br>
            System.out.println(&quot;after apply change set&quot;);<br>
<br>
                        ResourceChangeScannerConfiguration sconf=<br>
<br>
ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();<br>
                        sconf.setProperty(&quot;drools.resource.scanner.interval&quot;, &quot;30&quot;);<br>
                        ResourceFactory.getResourceChangeScannerService().configure(sconf);<br>
<br>
                        ResourceFactory.getResourceChangeNotifierService().start();<br>
                        ResourceFactory.getResourceChangeScannerService().start();<br>
<br>
                        System.out.println(&quot;After starting Notification service&quot;);<br>
<br>
                                _kagent.applyChangeSet(ResourceFactory.newUrlResource(url));<br>
                        _kbase = _kagent.getKnowledgeBase();<br>
<br>
                        Collection&lt;KnowledgePackage&gt; kpackages =<br>
_kbase.getKnowledgePackages();<br>
<br>
                    System.out.println(&quot;no of packages&quot;+kpackages.size());<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Application-Guvnor-integration-tp3655924p3655924.html" target="_blank">http://drools.46999.n3.nabble.com/Application-Guvnor-integration-tp3655924p3655924.html</a><br>


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>
</font></span></blockquote></div><br></div></div>