<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><base href="x-msg://1788/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Have you tested that the rules fire when you load them as DRL?</div><div><br></div><div>It would probably be worth showing us what EmployeeMap looks like and the rule which you expect to fire if there is an EmployeeMap in working memory.</div><div><br></div><div>The Drools version would also be useful.</div><div><br></div><div>Steve</div><div><br></div><br><div><div>On 17 Jul 2013, at 14:04, <a href="mailto:pritha.ghosh@wipro.com">pritha.ghosh@wipro.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Hi,<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">I am not able to run rules from .pkg resources.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Knowledgesession is getting populated with package and rules inside the packages but when I am firing ksession.fireAllRules(); no rules are getting executed.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Below is my program<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><b><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(127, 0, 85); ">final</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "><span class="Apple-converted-space">&nbsp;</span>KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.<i>newKnowledgeBuilder</i>();</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(63, 127, 95); ">// Use this line if calling rule defined using<span class="Apple-converted-space">&nbsp;</span><u>guvnor</u><span class="Apple-converted-space">&nbsp;</span>package</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><u>org.drools.io.impl.UrlResource</u><span class="Apple-converted-space">&nbsp;</span>urlResource;</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(127, 0, 85); ">try</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "><span class="Apple-converted-space">&nbsp;</span>{</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; urlResource = (<u>org.drools.io.impl.UrlResource</u>) org.drools.io.ResourceFactory</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .<i>newUrlResource</i>(</span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(127, 0, 85); ">new</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "><span class="Apple-converted-space">&nbsp;</span>java.net.URL(</span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(42, 0, 255); ">"<a href="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/OBSPOC/OBSSNAP/OBSPOC_OBSSNAP.pkg" style="color: purple; text-decoration: underline; ">http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/OBSPOC/OBSSNAP/OBSPOC_OBSSNAP.pkg</a>"</span><span style="font-size: 10pt; font-family: 'Courier New'; ">));</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(63, 127, 95); "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><u>urlResource.setBasicAuthentication(</u></span><u><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(42, 0, 255); ">"enabled"</span></u><u><span style="font-size: 10pt; font-family: 'Courier New'; ">)</span></u><span style="font-size: 10pt; font-family: 'Courier New'; ">;</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><u>urlResource.setUsername(</u></span><u><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(42, 0, 255); ">"admin"</span></u><u><span style="font-size: 10pt; font-family: 'Courier New'; ">)</span></u><span style="font-size: 10pt; font-family: 'Courier New'; ">;</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span><u>urlResource.setPassword(</u></span><u><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(42, 0, 255); ">"admin"</span></u><u><span style="font-size: 10pt; font-family: 'Courier New'; ">)</span></u><span style="font-size: 10pt; font-family: 'Courier New'; ">;</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kbuilder.add(urlResource,ResourceType.</span><i><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 0, 192); ">PKG</span></i><span style="font-size: 10pt; font-family: 'Courier New'; ">);</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(127, 0, 85); ">catch</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "><span class="Apple-converted-space">&nbsp;</span>(MalformedURLException e) {</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.</span><i><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 0, 192); ">out</span></i><span style="font-size: 10pt; font-family: 'Courier New'; ">.println(</span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(42, 0, 255); ">"malformed URL"</span><span style="font-size: 10pt; font-family: 'Courier New'; ">);</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e.printStackTrace();</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(127, 0, 85); ">catch</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "><span class="Apple-converted-space">&nbsp;</span>(Exception e) {</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(63, 127, 95); ">//<span class="Apple-converted-space">&nbsp;</span></span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(127, 159, 191); ">TODO</span></b><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(63, 127, 95); "><span class="Apple-converted-space">&nbsp;</span>Auto-generated catch block</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e.printStackTrace();</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(63, 127, 95); ">// create the knowledge base</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; KnowledgeBase kbase = KnowledgeBaseFactory.<i>newKnowledgeBase</i>();</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(63, 127, 95); ">// Check the builder for errors</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(127, 0, 85); ">if</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "><span class="Apple-converted-space">&nbsp;</span>(kbuilder.hasErrors()) {</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.</span><i><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 0, 192); ">out</span></i><span style="font-size: 10pt; font-family: 'Courier New'; ">.println(kbuilder.getErrors().toString() +<span class="Apple-converted-space">&nbsp;</span></span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(42, 0, 255); ">"********"</span><span style="font-size: 10pt; font-family: 'Courier New'; ">);</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(127, 0, 85); ">throw</span></b><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;</span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(127, 0, 85); ">new</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "><span class="Apple-converted-space">&nbsp;</span>RuntimeException(</span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(42, 0, 255); ">"Unable to compile the rule file."</span><span style="font-size: 10pt; font-family: 'Courier New'; ">);</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(127, 0, 85); ">else</span></b><span style="font-size: 10pt; font-family: 'Courier New'; ">{</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.</span><i><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(0, 0, 192); ">out</span></i><span style="font-size: 10pt; font-family: 'Courier New'; ">.println(</span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(42, 0, 255); ">".....Rule File is Read Successfully...."</span><span style="font-size: 10pt; font-family: 'Courier New'; ">);</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(63, 127, 95); ">// get the compiled packages (which are<span class="Apple-converted-space">&nbsp;</span><u>serializable</u>)</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(127, 0, 85); ">final</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "><span class="Apple-converted-space">&nbsp;</span><u>Collection</u><span class="Apple-converted-space">&nbsp;</span>pkgs = kbuilder</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .getKnowledgePackages();</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(63, 127, 95); ">// add the packages to a<span class="Apple-converted-space">&nbsp;</span><u>knowledgebase</u><span class="Apple-converted-space">&nbsp;</span>(deploy the knowledge packages).</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(63, 127, 95); ">//&nbsp; final KnowledgeBase<span class="Apple-converted-space">&nbsp;</span><u>kbase</u><span class="Apple-converted-space">&nbsp;</span>= KnowledgeBaseFactory.newKnowledgeBase();</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kbase.addKnowledgePackages(<u>pkgs</u>);</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Apple-converted-space">&nbsp;</span></span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(127, 0, 85); ">final</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "><span class="Apple-converted-space">&nbsp;</span>StatefulKnowledgeSession ksession = kbase</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .newStatefulKnowledgeSession();</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ksession.addEventListener(</span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(127, 0, 85); ">new</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "><span class="Apple-converted-space">&nbsp;</span>DebugAgendaEventListener());</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ksession.addEventListener(</span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(127, 0, 85); ">new</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "><span class="Apple-converted-space">&nbsp;</span>DebugWorkingMemoryEventListener());</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EmployeeMap employeeMap =<span class="Apple-converted-space">&nbsp;</span></span><b><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(127, 0, 85); ">new</span></b><span style="font-size: 10pt; font-family: 'Courier New'; "><span class="Apple-converted-space">&nbsp;</span>EmployeeMap();</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; employeeMap.setEmployeeCountry(</span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(42, 0, 255); ">"INDIA"</span><span style="font-size: 10pt; font-family: 'Courier New'; ">);</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; employeeMap.setEmployeeID(1);</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; employeeMap.setEmployeeName(</span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(42, 0, 255); ">"USERP"</span><span style="font-size: 10pt; font-family: 'Courier New'; ">);</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;</span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ksession.insert(employeeMap);</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp; ksession.fireAllRules();</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 10pt; font-family: 'Courier New'; "><o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 10pt; font-family: 'Courier New'; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ksession.dispose();</span><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Thanks,<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Pritha<o:p></o:p></div></div><p><strong><span style="font-size: 10pt; font-family: 'Palatino Linotype', serif; color: green; ">Please do not print this email unless it is absolutely necessary.</span></strong><span style="font-family: Arial, sans-serif; "><o:p></o:p></span></p><p>The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.</p><p>WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.</p><p><a href="http://www.wipro.com" style="color: purple; text-decoration: underline; ">www.wipro.com</a></p>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" style="color: purple; text-decoration: underline; ">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" style="color: purple; text-decoration: underline; ">https://lists.jboss.org/mailman/listinfo/rules-users</a></div></blockquote></div><br></body></html>