<div> </div>
<div>Thanks, Andre, I got it this time.</div>
<div> </div>
<div>Tak </div>
<div> </div>
<div><br><br> </div>
<div class="gmail_quote">2009/6/10 Malenfant, Andre <span dir="ltr">&lt;<a href="mailto:andre.malenfant@cgi.com">andre.malenfant@cgi.com</a>&gt;</span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div lang="EN-US" vlink="purple" link="blue">
<div>
<p><span style="COLOR: #1f497d; FONT-SIZE: 11pt">Sorry, I gave you instruction for the imports and globals…</span></p>
<p><span style="COLOR: #1f497d; FONT-SIZE: 11pt"> </span></p>
<p style="TEXT-INDENT: -0.25in"><span style="COLOR: #1f497d; FONT-SIZE: 11pt"><span>-<span style="FONT: 7pt &#39;Times New Roman&#39;">          </span></span></span><span style="COLOR: #1f497d; FONT-SIZE: 11pt">Open the Properties view in Eclipse</span></p>

<p style="TEXT-INDENT: -0.25in"><span style="COLOR: #1f497d; FONT-SIZE: 11pt"><span>-<span style="FONT: 7pt &#39;Times New Roman&#39;">          </span></span></span><span style="COLOR: #1f497d; FONT-SIZE: 11pt">Select the background of the flow (unselect any selected items)</span></p>

<p style="TEXT-INDENT: -0.25in"><span style="COLOR: #1f497d; FONT-SIZE: 11pt"><span>-<span style="FONT: 7pt &#39;Times New Roman&#39;">          </span></span></span><span style="COLOR: #1f497d; FONT-SIZE: 11pt">The Properties view should refresh</span></p>

<p style="TEXT-INDENT: -0.25in"><span style="COLOR: #1f497d; FONT-SIZE: 11pt"><span>-<span style="FONT: 7pt &#39;Times New Roman&#39;">          </span></span></span><span style="COLOR: #1f497d; FONT-SIZE: 11pt">The package property should be available for edit in the view</span></p>

<p><span style="COLOR: #1f497d; FONT-SIZE: 11pt"> </span></p>
<div style="BORDER-BOTTOM-STYLE: none; PADDING-BOTTOM: 0in; BORDER-RIGHT-STYLE: none; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-LEFT-STYLE: none; BORDER-TOP: #b5c4df 1pt solid; PADDING-TOP: 3pt">
<p><b><span style="FONT-SIZE: 10pt">From:</span></b><span style="FONT-SIZE: 10pt"> <a target="_blank" href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a> [mailto:<a target="_blank" href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>] <b>On Behalf Of </b>Tak-po Li<br>
<b>Sent:</b> Wednesday, June 10, 2009 4:50 PM 
<div class="im"><br><b>To:</b> Rules Users List<br><b>Subject:</b> Re: [rules-users] re: NumberGuessExample</div></span>
<p></p></p></div>
<p> </p>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p>I do not get it.  What I need is to change the text of &quot;com.sample&quot; in file Guess.rf.  How this can be done in the Drools plugin?</p></div>
<div>
<div></div>
<div class="h5">
<div>
<p> </p></div>
<div>
<p>Thanks,</p></div>
<div>
<p> </p></div>
<div>
<p>Tak</p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; <br>&lt;process xmlns=&quot;<a target="_blank" href="http://drools.org/drools-5.0/process">http://drools.org/drools-5.0/process</a>&quot;<br>         xmlns:xs=&quot;<a target="_blank" href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>&quot;<br>
         xs:schemaLocation=&quot;<a target="_blank" href="http://drools.org/drools-5.0/process">http://drools.org/drools-5.0/process</a> drools-processes-5.0.xsd&quot;<br>         type=&quot;RuleFlow&quot; name=&quot;Number Guess&quot; id=&quot;Number Guess&quot; <span style="COLOR: #333333">package-name</span>=&quot;<span style="COLOR: red">com.sample</span>&quot; &gt;</p>
</div>
<div>
<p>  &lt;header&gt;<br>    &lt;imports&gt;<br>      &lt;<span style="COLOR: #333333">import name</span>=&quot;<span style="COLOR: red">com.sample.</span>NumberGuessExample.Game&quot; /&gt;<br>      &lt;import name=&quot;com.sample.NumberGuessExample.GameRules&quot; /&gt;<br>
      &lt;import name=&quot;com.sample.NumberGuessExample.Guess&quot; /&gt;<br>      &lt;import name=&quot;com.sample.NumberGuessExample.RandomNumber&quot; /&gt;<br>    &lt;/imports&gt;<br>  &lt;/header&gt;</p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p><br><br> </p></div>
<div>
<p>2009/6/10 Mauricio Salatino &lt;<a target="_blank" href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>&gt;</p>
<p>You can change that looking at the properties of the process. Clicking in the background of the designer. </p>
<div>
<div>
<p style="MARGIN-BOTTOM: 12pt"> </p>
<div>
<p>2009/6/10 Tak-po Li &lt;<a target="_blank" href="http://takpo.li/">takpo.li</a>@<a target="_blank" href="http://gmail.com/">gmail.com</a>&gt;</p>
<div>
<p> </p></div>
<div>
<p>I look at Guess.rf the xml file.  I notice the Package and Import locations are pointing to the old location.  After I change them to the new one by hand.  The code works.</p></div>
<div>
<p> </p></div>
<div>
<p>How can I change the above in Eclipse GUI interface?</p></div>
<div>
<div>
<div>
<p> </p></div>
<div>
<p>Thanks,</p></div>
<div>
<p> </p></div>
<div>
<p>Tak</p></div>
<div>
<p> </p></div>
<div>
<p><br><br> </p></div>
<div>
<p>2009/6/10 Mauricio Salatino &lt;<a target="_blank" href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>&gt;</p>
<div>
<p style="MARGIN-BOTTOM: 12pt"><b><u><span style="COLOR: navy; FONT-SIZE: 10pt">java.lang.IllegalArgumentException</span></u></b><b><span style="COLOR: red; FONT-SIZE: 10pt">: Unknown process ID: Number Guess <br><br></span></b></p>
</div>
<p style="MARGIN-BOTTOM: 12pt">That exceptions means that you probably don&#39;t add the process definition to the current knowledgeBuilder.<br>To see these kind of problems you probably need to add something like this after KnowledgeBuilder add calls:</p>
<pre style="MARGIN-BOTTOM: 12pt">if ( kbuilder.hasErrors() ) {<br>
    System.err.println( builder.getErrors().toString() );<br>
}<br>
<br>
</pre>
<div>
<div>
<p style="MARGIN-BOTTOM: 12pt"> </p>
<div>
<p><br>2009/6/10 Tak-po Li &lt;<a target="_blank" href="http://takpo.li/">takpo.li</a>@<a target="_blank" href="http://gmail.com/">gmail.com</a>&gt;</p>
<div>
<p> </p></div>
<div>
<p>Mauricio, </p></div>
<div>
<p> </p></div>
<div>
<p>I would like to take this example as the base to play around.  That is what I did:</p></div>
<div>
<p> </p></div>
<div>
<p>1. Make a project &quot;try&quot; that generates the HellowWorld for me in Eclipse.</p></div>
<div>
<p> </p></div>
<div>
<p>2. add directory &quot;log&quot;</p></div>
<div>
<p> </p></div>
<div>
<p>3. Move file Guess.java to the Java/com/sample directory.  Move Guess.drl and Guss.rf to rule directory.</p></div>
<div>
<p> </p></div>
<div>
<div>
<p>4. Change Package and Implort location from org/drools/examples to com/sample in the above three files.</p></div>
<div>
<p> </p></div>
<div>
<p>Eclipse shows compiler error pointing to ShoppingExample.<b><span style="COLOR: #7f0055; FONT-SIZE: 10pt">class.  </span></b></p></div>
<div>
<p> </p></div>
<div>
<p><b><span style="COLOR: #7f0055">I did the same to Shopping.java and Shopping.drl and the compiler error is removed, and the following is the run time error messages:</span></b></p></div>
<div>
<p> </p></div>
<div>
<p><b><span style="COLOR: red; FONT-SIZE: 10pt">Exception in thread &quot;main&quot; </span></b></p>
<p><b><u><span style="COLOR: navy; FONT-SIZE: 10pt">java.lang.IllegalArgumentException</span></u></b><b><span style="COLOR: red; FONT-SIZE: 10pt">: Unknown process ID: Number Guess </span></b></p>
<p><b><span style="COLOR: red; FONT-SIZE: 10pt">at org.drools.common.AbstractWorkingMemory.startProcess(</span></b></p>
<p><b><u><span style="COLOR: navy; FONT-SIZE: 10pt">AbstractWorkingMemory.java:1615</span></u></b><b><span style="COLOR: red; FONT-SIZE: 10pt">) </span></b></p>
<p><b><span style="COLOR: red; FONT-SIZE: 10pt">at org.drools.common.AbstractWorkingMemory.startProcess(</span></b></p>
<p><b><u><span style="COLOR: navy; FONT-SIZE: 10pt">AbstractWorkingMemory.java:1604</span></u></b><b><span style="COLOR: red; FONT-SIZE: 10pt">) </span></b></p>
<p><b><span style="COLOR: red; FONT-SIZE: 10pt">at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(</span></b></p>
<p><b><u><span style="COLOR: navy; FONT-SIZE: 10pt">StatefulKnowledgeSessionImpl.java:267</span></u></b><b><span style="COLOR: red; FONT-SIZE: 10pt">) </span></b></p>
<p><b><span style="COLOR: red; FONT-SIZE: 10pt">at com.sample.NumberGuessExample.main(</span></b></p>
<p><b><u><span style="COLOR: navy; FONT-SIZE: 10pt">NumberGuessExample.java:38</span></u></b><b><span style="COLOR: red; FONT-SIZE: 10pt">)</span></b></p></div>
<div>
<p>Could you please point me the right direction?</p></div>
<div>
<p> </p></div>
<div>
<p>Thanks,</p></div>
<div>
<p> </p></div>
<div>
<p>Tak</p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div>
<div>
<p> </p></div></div>
<div>
<p> </p></div>
<div>
<p><br><br> </p></div>
<div>
<p>2009/6/10 Mauricio Salatino &lt;<a target="_blank" href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>&gt; </p>
<div>
<div>
<blockquote style="BORDER-BOTTOM-STYLE: none; BORDER-LEFT: #cccccc 1pt solid; PADDING-BOTTOM: 0in; BORDER-RIGHT-STYLE: none; PADDING-LEFT: 6pt; PADDING-RIGHT: 0in; BORDER-TOP-STYLE: none; MARGIN-LEFT: 4.8pt; MARGIN-RIGHT: 0in; PADDING-TOP: 0in">

<p> </p>
<p style="MARGIN-BOTTOM: 12pt">This is only a reference to know in which class loader is the resource... The idea is to know that the resource (in this case: <span style="COLOR: #2a00ff; FONT-SIZE: 10pt">NumberGuess.drl and NumberGuess.rf</span>) is in the same class loader that the ShoppingExample.<b><span style="COLOR: #7f0055; FONT-SIZE: 10pt">class</span></b></p>

<div>
<p>2009/6/10 Tak-po Li &lt;<a target="_blank" href="http://takpo.li/">takpo.li</a>@<a target="_blank" href="http://gmail.com/">gmail.com</a>&gt;</p>
<div>
<div>
<div>
<p> </p></div>
<div>
<p>I am a newbie with Drools rules.  I just download the examples.  I notice in line19 of  NumberGuessExample.java, there are two statement that referring to ShoppingExample.<b><span style="COLOR: #7f0055; FONT-SIZE: 10pt">class.</span></b></p>
</div>
<div>
<p> </p></div>
<div>
<p>It seems this is different example.  Could someone help me out?</p></div>
<div>
<p> </p></div>
<div>
<p>Thanks,</p></div>
<div>
<p> </p></div>
<div>
<p>Tak</p></div>
<div>
<p> </p></div>
<div>
<p> <span style="FONT-SIZE: 10pt"> </span></p>
<p><span style="FONT-SIZE: 10pt">kbuilder.add( ResourceFactory.<i>newClassPathResource</i>( </span></p>
<p><span style="COLOR: #2a00ff; FONT-SIZE: 10pt">&quot;NumberGuess.drl&quot;</span><span style="FONT-SIZE: 10pt">, </span></p>
<p><span style="FONT-SIZE: 10pt">ShoppingExample.</span></p>
<p><b><span style="COLOR: #7f0055; FONT-SIZE: 10pt">class</span></b><span style="FONT-SIZE: 10pt"> ), </span></p>
<p><span style="FONT-SIZE: 10pt">ResourceType.</span></p>
<p><i><span style="COLOR: #0000c0; FONT-SIZE: 10pt">DRL</span></i><span style="FONT-SIZE: 10pt"> ); </span></p>
<p><span style="FONT-SIZE: 10pt">kbuilder.add( ResourceFactory.<i>newClassPathResource</i>( </span></p>
<p><span style="COLOR: #2a00ff; FONT-SIZE: 10pt">&quot;NumberGuess.rf&quot;</span><span style="FONT-SIZE: 10pt">, </span></p>
<p><span style="FONT-SIZE: 10pt">ShoppingExample.</span></p>
<p><b><span style="COLOR: #7f0055; FONT-SIZE: 10pt">class</span></b><span style="FONT-SIZE: 10pt"> ), </span></p>
<p><span style="FONT-SIZE: 10pt">ResourceType.</span></p>
<p><i><span style="COLOR: #0000c0; FONT-SIZE: 10pt">DRF</span></i><span style="FONT-SIZE: 10pt"> );</span></p></div>
<p> </p></div></div>
<p style="MARGIN-BOTTOM: 12pt">_______________________________________________<br>rules-users mailing list<br><a target="_blank" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></p>
</div>
<p style="MARGIN-BOTTOM: 12pt"><span style="COLOR: #888888"><br><br clear="all"><br>-- <br>- <a target="_blank" href="http://salaboy.wordpress.com/">http://salaboy.wordpress.com</a><br>- <a target="_blank" href="http://www.jbug.com.ar/">http://www.jbug.com.ar</a><br>
- Salatino &quot;Salaboy&quot; Mauricio -<br></span><br>_______________________________________________<br>rules-users mailing list<br><a target="_blank" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></p></blockquote></div></div></div>
<p style="MARGIN-BOTTOM: 12pt"><br><br>_______________________________________________<br>rules-users mailing list<br><a target="_blank" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></p>
</div>
<p><br><br clear="all"><br>-- <br>- <a target="_blank" href="http://salaboy.wordpress.com/">http://salaboy.wordpress.com</a><br>- <a target="_blank" href="http://www.jbug.com.ar/">http://www.jbug.com.ar</a><br>- Salatino &quot;Salaboy&quot; Mauricio -</p>
</div></div>
<p style="MARGIN-BOTTOM: 12pt"><br>_______________________________________________<br>rules-users mailing list<br><a target="_blank" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></p>
</div>
<p> </p></div></div>
<p style="MARGIN-BOTTOM: 12pt"><br>_______________________________________________<br>rules-users mailing list<br><a target="_blank" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></p>
</div>
<p><br><br clear="all"><br>-- <br>- <a target="_blank" href="http://salaboy.wordpress.com/">http://salaboy.wordpress.com</a><br>- <a target="_blank" href="http://www.jbug.com.ar/">http://www.jbug.com.ar</a><br>- Salatino &quot;Salaboy&quot; Mauricio -</p>
</div></div>
<p style="MARGIN-BOTTOM: 12pt"><br>_______________________________________________<br>rules-users mailing list<br><a target="_blank" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></p>
</div>
<p> </p></div></div></div></div><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>