Thanks,

what do you suggest to clone the object in the first line of the consequence?

Regards
Raffo



2007/9/24, Mark Proctor < mproctor@codehaus.org>:
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.

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?

Mark
Raffaele Viola wrote:
when a condition match call statoNodo.variabiliInOR(....) that add in to the list the first arg

the action function add the list in the azioe with the method azione.setAzione("pio",lista);

My list result is :
Pisa
Cagliari
Pisa
Cagliari

package org.drools.examples.decisiontable;
#generated from Decision Table
import com.RuleEngine.ControlloreNodo.*;
import com.RuleEngine.ControlloreNodo.OggettiControllo.Azione;
import com.RuleEngine.ControlloreNodo.OggettiStato.StatoNodo;
import java.util.ArrayList;

global StatoNodo statoNodo;
global Azione azione;
global ArrayList lista;

#From row number: 13
rule "Pricing bracket_13"
   
    salience 1
    when
        eval(statoNodo.variabiliInOR("Pisa",lista,1))
    then
        azione.setAzione("ciao",lista);
end

#From row number: 14
rule "Pricing bracket_14"
   
    salience 3
    when
        eval(statoNodo.variabiliInOR("Cagliari,Pisa",lista,1))
    then
        azione.setAzione("pio",lista);
end


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users