Hi, <br>Thanks so much for the info. <br>So then is there any way to actually add the dslr (created at runtime) files to be detected by the program??<br>Because with eclipse we always need to keep refreshing the files everytime which totally defeats the purpose of using business rules !! Until ofcourse you have fixed set of rules!<br>
Any other ideas?<br>Also is there a problem if we add multiple .dslr files to our rule base???<br>When I do that only the first .dslr files actually executes and the others dont. I tried creating all the same files as .drl files and it works perfectly fine.<br>
Any idea why that happens??? I dont get any error stack.<br><br>Please help.<br><br>Thanks<br>M<br><br><div class="gmail_quote">2010/6/19 Esteban Aliverti <span dir="ltr">&lt;<a href="mailto:esteban.aliverti@gmail.com">esteban.aliverti@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">If yo are using Kagent, you don&#39;t need to add the change set to kbuilder.<div>The steps you need to implement should be something like this:</div>
<div><br></div><div>1. Start ResourceChangeScanner and ResourceChangeMonitor services </div>

<div>2. Create a changeset.xml file containing all the resources you want to add to the kagent&#39;s kbase</div><div>3. Create a new kagent</div><div>4. kagent.applyChangeSet() &lt;-- The agent will process each resource the xml defines and add a monitor to detect further changes.</div>


<div>5. kagent.getKnowledgeBase() &lt;-- the agen&#39;t kbase will contain all the rules now</div><div><br></div><div>If you are looking for examples: <a href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/agent/" target="_blank">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/agent/</a></div>


<div><br></div><div>The bad new is that kagent can&#39;t manage dsl/dslr resouces yet. I&#39;m working on that right now. Please follow these issues to be inform: <a href="https://jira.jboss.org/browse/JBRULES-2377" target="_blank">https://jira.jboss.org/browse/JBRULES-2377</a> &amp; <a href="https://jira.jboss.org/browse/JBRULES-2350" target="_blank">https://jira.jboss.org/browse/JBRULES-2350</a></div>


<div><br></div><div>Best,</div><div><br><br><div class="gmail_quote">2010/6/18 Fnu Mahalakshmi <span dir="ltr">&lt;<a href="mailto:FMahalakshmi@nyx.com" target="_blank">FMahalakshmi@nyx.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">










<div link="blue" vlink="purple" lang="EN-US">

<div>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">Hi guys,</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">In my program I have couple of .brl, .drl and .dslr files
which get added to the rulebase.</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">Now my .brl files get converted to drl files and then have
to be added to the rulebase.</span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">After creating my .drl or .dslr file I am using this code to
update the resources in my change-set.xml</span></font></p>

<p class="MsoNormal" style=""><u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">ResourceChangeScannerConfiguration sconf =
ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();</span></font></u><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>




<p class="MsoNormal" style=""><u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">sconf.setProperty( </span></font></u><u><font size="2" color="#2a00ff" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);">&quot;drools.resource.scanner.interval&quot;</span></font></u><u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">,</span></font></u><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>




<p class="MsoNormal" style=""><u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">                  
</span></font></u><u><font size="2" color="#2a00ff" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);">&quot;30&quot;</span></font></u><u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> ); </span></font></u><u><font size="2" color="#3f7f5f" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(63, 127, 95);">// set the disk scanning interval to 30s, default is 60s</span></font></u><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>




<p class="MsoNormal" style=""><u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">ResourceFactory.getResourceChangeScannerService().configure</span></font></u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">( sconf )<u>;</u></span></font><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>




<p class="MsoNormal" style=""><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">ResourceFactory.getResourceChangeNotifierService()<u>.</u>start(<u>);</u></span></font><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>




<p class="MsoNormal" style=""><u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">KnowledgeBuilder</span></font></u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder()<u>;</u></span></font><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>




<p class="MsoNormal" style=""><u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">kbuilder.add( ResourceFactory.newClassPathResource( </span></font></u><u><font size="2" color="#2a00ff" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);">&quot;change-set.xml&quot;</span></font></u><u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">, getClass()),ResourceType.CHANGE_SET );</span></font></u><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>




<p class="MsoNormal" style=""><b><u><font size="2" color="#7f0055" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85); font-weight: bold;">if</span></font></u></b><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> ( kbuilder.hasErrors() <u>)</u> <u>{</u></span></font><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>




<p class="MsoNormal" style=""><u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">   System.err.println( kbuilder.getErrors().toString()
);</span></font></u><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>

<p class="MsoNormal"><u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">}</span></font></u></p>

<p class="MsoNormal"><u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"><span style="text-decoration: none;"> </span></span></font></u></p>


<p class="MsoNormal"><u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">Now as per my
understanding:</span></font></u></p>

<p class="MsoNormal"><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">Since a new .drl
file has been just created – the resource notifier will update my
change-set.xml file of the change.</span></font></p>

<p class="MsoNormal"><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span></font></p>

<p class="MsoNormal"><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">Now I need to
load this new file to my rulebase along with my dsl file.</span></font></p>

<p class="MsoNormal" style=""><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></font></p>

<p class="MsoNormal" style=""><u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">kbuilder.add( ResourceFactory.newClassPathResource( </span></font></u><u><font size="2" color="#2a00ff" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(42, 0, 255);">&quot;change-set.xml&quot;</span></font></u><u><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">, getClass()),ResourceType.CHANGE_SET );</span></font></u><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></font></p>




<p class="MsoNormal"><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span></font></p>

<p class="MsoNormal"><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">is adding my new
created file to my knowledge pacakage.</span></font></p>

<p class="MsoNormal"><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">How can I specify
my dsl file also to be added along with it???</span></font></p>

<p class="MsoNormal"><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span></font></p>

<p class="MsoNormal"><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">Can you please
guide me in the right direction..??</span></font></p>

<p class="MsoNormal"><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">Please help.</span></font></p>

<p class="MsoNormal"><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span></font></p>

<p class="MsoNormal"><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">Thank you.</span></font></p>

<p class="MsoNormal"><font size="2" color="black" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">M</span></font></p>

</div>

<pre></pre>

<p></p><hr size="1"><p></p>
<p><b><font color="green">Please consider the environment before printing this email.</font></b></p>
<p><b>Visit our website at <a href="http://www.nyse.com" target="_blank">http://www.nyse.com</a> <br>

*****************************************************************************
<br>
Note:  The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure.  If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system.  Thank you.  NYSE Euronext.

</b></p><pre></pre></div>


<br></div></div><div class="im">_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
<br></div></blockquote></div><br><br clear="all"><br>-- <br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>
</div>
<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>
<br></blockquote></div><br>