Thanks,<br><br>what do you suggest to clone the object in the first line of the consequence?<br><br>Regards<br>Raffo<br><br><br><br><div><span class="gmail_quote">2007/9/24, Mark Proctor &lt;<a href="mailto:mproctor@codehaus.org">
mproctor@codehaus.org</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


  

<div bgcolor="#ffffff" text="#000000">
Have you thought of inserting your data, rather than setting it as a
global? It looks like statoNodo should be inserted and not a global.<br>
<br>
Also each rule will still use the same instance, if you need another
instance why not clone the object in the first line of the consequence?<br>
<br>
Mark<br>
Raffaele Viola wrote:
<blockquote type="cite"><div><span class="q" id="q_1153499ec41a4f5d_1">when a condition match call statoNodo.variabiliInOR(....)
that add in to the list the first arg<br>
  <br>
the action function add the list in the azioe with the method
azione.setAzione(&quot;pio&quot;,lista);<br>
  <br>
My list result is :
  <br>
  <span style="color: rgb(255, 0, 0);">Pisa</span><br style="color: rgb(255, 0, 0);">
  <span style="color: rgb(255, 0, 0);">Cagliari</span><br style="color: rgb(255, 0, 0);">
  <span style="color: rgb(255, 0, 0);">Pisa</span>
  <br style="color: rgb(255, 0, 0);">
  <span style="color: rgb(255, 0, 0);">Cagliari</span><br>
  <br>
p<span style="color: rgb(0, 0, 102);">ackage
org.drools.examples.decisiontable;</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">#generated from Decision Table</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">import
com.RuleEngine.ControlloreNodo.*;</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">import
com.RuleEngine.ControlloreNodo.OggettiControllo.Azione;</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">import
com.RuleEngine.ControlloreNodo.OggettiStato.StatoNodo;</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">import java.util.ArrayList;</span><br style="color: rgb(0, 0, 102);">
  <br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">global StatoNodo statoNodo;</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">global Azione azione;</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">global ArrayList lista;</span><br style="color: rgb(0, 0, 102);">
  <br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">#From row number: 13</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">rule &quot;Pricing bracket_13&quot;</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">&nbsp;&nbsp;&nbsp; </span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">&nbsp;&nbsp;&nbsp; salience 1</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">&nbsp;&nbsp;&nbsp; when</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
eval(statoNodo.variabiliInOR(&quot;Pisa&quot;,lista,1))</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">&nbsp;&nbsp;&nbsp; then</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
azione.setAzione(&quot;ciao&quot;,lista);</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">end</span><br style="color: rgb(0, 0, 102);">
  <br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">#From row number: 14</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">rule &quot;Pricing bracket_14&quot;</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">&nbsp;&nbsp;&nbsp; </span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">&nbsp;&nbsp;&nbsp; salience 3</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">&nbsp;&nbsp;&nbsp; when</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
eval(statoNodo.variabiliInOR(&quot;Cagliari,Pisa&quot;,lista,1))</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">&nbsp;&nbsp;&nbsp; then</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
azione.setAzione(&quot;pio&quot;,lista);</span><br style="color: rgb(0, 0, 102);">
  <span style="color: rgb(0, 0, 102);">end</span><br>
  <br>
  </span></div><pre><hr size="4" width="90%"><span class="q">
_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users@lists.jboss.org
</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.jboss.org/mailman/listinfo/rules-users</a>
  </span></pre>
</blockquote>
<br>
</div>

<br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" 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>