<br clear="all"><div>How can i access the rules (which i have created in Drools Guvnor) to my java application?</div><div>plz give me some example....</div><div><br></div><div>i have tried with below code, is there any mistakes?? if yes pls mention....</div>
<div><br></div><div><br></div><div><div><span style="background-color:rgb(255,255,102)">private static KnowledgeBase createKnowledgeBase() {</span></div><div><span style="background-color:rgb(255,255,102)"><br></span></div>
<div><span style="background-color:rgb(255,255,102)"><span style="white-space:pre-wrap">                </span>KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();</span></div>
<div><span style="background-color:rgb(255,255,102)"><br></span></div><div><span style="background-color:rgb(255,255,102)"><span style="white-space:pre-wrap">                </span>KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent( "MyAgent" );</span></div>
<div><span style="background-color:rgb(255,255,102)"><br></span></div><div><span style="background-color:rgb(255,255,102)"><span style="white-space:pre-wrap">                </span>KnowledgeAgentConfiguration kaconf = KnowledgeAgentFactory.newKnowledgeAgentConfiguration();</span></div>
<div><span style="background-color:rgb(255,255,102)"><br></span></div><div><span style="background-color:rgb(255,255,102)"><span style="white-space:pre-wrap">                </span>kaconf.setProperty( "drools.agent.scanDirectories", "false" ); </span></div>
<div><span style="background-color:rgb(255,255,102)"><br></span></div><div><span style="background-color:rgb(255,255,102)"><span style="white-space:pre-wrap">                </span>kagent.applyChangeSet( ResourceFactory.newUrlResource("<a href="http://localhost:8080/guvnor/rest/packages/ProductPositionAlert/assets/change-set.xml/source" target="_blank">http://localhost:8080/guvnor/rest/packages/ProductPositionAlert/assets/change-set.xml/source</a>") ); </span></div>
<div><span style="background-color:rgb(255,255,102)"><br></span></div><div><span style="background-color:rgb(255,255,102)"><span style="white-space:pre-wrap">                </span>return   kbase;</span></div><div><span style="background-color:rgb(255,255,102)"><br>
</span></div><div><span style="background-color:rgb(255,255,102)"><span style="white-space:pre-wrap">        </span>}</span></div></div><div><br></div><div><br>
</div><div><br></div><div>my guvnor package sanpshot details are</div><div><br></div><div><img src="cid:ii_13a73d66611bee78" alt="Inline image 2"><br></div><div><br></div><div><br></div><div>thanks in advance</div>-- <br>
<div><strong>Regards</strong></div><div><font color="#6600cc" face="garamond, serif" size="4"><b> sainadh</b></font></div><div><p style="text-align:justify"><font color="#6666cc" face="comic sans ms, sans-serif" size="4"><span style="line-height:14px"> </span></font></p>
</div><div></div><div><font color="#000066" face="garamond, serif" size="4"><b> </b></font></div><br><br><br>