<div dir="ltr">Actually, the ksession.insert and setGlobal need to be reversed in the example I provided, but my questions remain the same - why reinsert the object and are you inserting elsewhere it to begin with?</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Jan 24, 2013 at 12:22 PM, Jeremy Ary <span dir="ltr">&lt;<a href="mailto:jeremy.ary@gmail.com" target="_blank">jeremy.ary@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">
<div dir="ltr"><div><span style>rule &quot;actes par competence&quot;</span><br></div><div><pre style>no-loop
        when
                $a : Acte();
                eval($a.getCompetence().equals(&quot;MEDECIN&quot;))
                
        then
                insert($a);
end</pre><pre style><br></pre><pre style>This rule seems incorrect to me. In readable form, this rule says &quot;When there exists some Acte whose competennce equals &quot;MEDECIN&quot;, then insert that Acte&quot;. If an Acte has already been inserted for this rule to find, why would you want to re-insert the same Acte? I think you might misunderstand the basics of setting up a rules session. Somewhere close to where you are using setGlobal(), are you using a &quot;ksession.insert(new Acte())&quot; or something similar?</pre>

<pre style><br></pre><pre style>If you were to do this instead, then your rule would fire...although again, I&#39;m not sure why you want to reinsert something that&#39;s already been inserted:</pre>
<pre style><br></pre><pre style>Acte acte = new Acte();</pre><pre style>acte.setCompetence(&quot;MEDICIN&quot;);</pre><pre style>FactHandle acteHandle = ksession.insert(acte);</pre>
<pre style>ksession.setGlobal(&quot;test&quot;, &quot;my string test&quot;);</pre><pre style>ksession.fireAllRules();</pre></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">

On Thu, Jan 24, 2013 at 12:03 PM, Mister Nono <span dir="ltr">&lt;<a href="mailto:noel.maurice@univ-jfc.fr" target="_blank">noel.maurice@univ-jfc.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

See the solution at this post :<br>
<a href="http://drools.46999.n3.nabble.com/Compare-two-String-objects-tp4021730p4021791.html" target="_blank">http://drools.46999.n3.nabble.com/Compare-two-String-objects-tp4021730p4021791.html</a><br>
&lt;<a href="http://drools.46999.n3.nabble.com/Compare-two-String-objects-tp4021730p4021791.html" target="_blank">http://drools.46999.n3.nabble.com/Compare-two-String-objects-tp4021730p4021791.html</a>&gt;<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Convert-Integer-to-int-in-rule-file-tp4021739p4021795.html" target="_blank">http://drools.46999.n3.nabble.com/Convert-Integer-to-int-in-rule-file-tp4021739p4021795.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" 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>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>