[rules-users] Problem in the set variable in the rules

grupo cft ing sostware infocft at gmail.com
Mon Aug 27 18:14:15 EDT 2007


hi list, Y have the next problem in the rules:

rule "Valida Duracion nula"

 when
  $v : Validaciones(flag == 0)

 then

  $v.setFlag(1);
  System.out.println( "obtenemos flag " + $v.getFlag() );


end


rule "valida Duracion Destino"

 when

   $v: Validaciones(flag == 0)


 then
  $v.setResultado("l");
  System.out.println( "obtenemos  "  + $v.getResultado());
  System.out.println( "obtenemos cantidad seg dos " + $v.getFlag() );


end

the problem is:

the flag variable values begin in 0 (in the class in java), in the first
rules the change a 1 (setFlag) and
Should not execute rule seconds her, But it is  executed, why?
thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070827/d81cbb0e/attachment.html 


More information about the rules-users mailing list