[rules-users] Fwd: assertion of object

Raffaele Viola raffovi at gmail.com
Fri Sep 21 15:34:03 EDT 2007


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070921/a43c71b4/attachment.html 


More information about the rules-users mailing list