<div dir="ltr"><div><span style="color:rgb(0,0,0)">rule &quot;actes par competence&quot;</span><br></div><div><pre style="color:rgb(0,0,0)">no-loop
        when
                $a : Acte();
                eval($a.getCompetence().equals(&quot;MEDECIN&quot;))
                
        then
                insert($a);
end</pre><pre style="color:rgb(0,0,0)"><br></pre><pre style="color:rgb(0,0,0)">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="color:rgb(0,0,0)"><br></pre><pre style="color:rgb(0,0,0)">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="color:rgb(0,0,0)"><br></pre><pre style="color:rgb(0,0,0)">Acte acte = new Acte();</pre><pre style="color:rgb(0,0,0)">acte.setCompetence(&quot;MEDICIN&quot;);</pre><pre style="color:rgb(0,0,0)">FactHandle acteHandle = ksession.insert(acte);</pre>
<pre style="color:rgb(0,0,0)">ksession.setGlobal(&quot;test&quot;, &quot;my string test&quot;);</pre><pre style="color:rgb(0,0,0)">ksession.fireAllRules();</pre></div></div><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">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>