There is no way to do what you want. Evaluation of CEs happens at
one time, and executing the Consequence is done anytime later.
Just call validarNumeroCuenta again in the consequence. If it
is very costly, you might consider implementing a memoization
technique.
-W
On Fri, Feb 5, 2010 at 9:07 PM, YamilBracho <yamilbracho@hotmail.com> wrote:
>
> Hi
> I have this rule in my drl file :
>
> rule "cuentaOrigen Numerico 20 digitos y Modulo 11"
> when
> $detalle : ArchivoDetalleBean( msg=
> eval(!ValidationUtils.validarNumeroCuenta(cuentaOrigen)) );
> then
> errorList.add(new ErrorPlugInBean(1, msg));
> end
>
> I would like to get the "msg" String var and use it in the "then" clasuse
> validarNumeroCuenta() ia a method that return a string
>
> How can I do that ?
>
> TIA
> Yamil
> --
> View this message in context: http://n3.nabble.com/Get-a-value-in-when-clause-and-use-it-in-then-clasuse-tp185076p189285.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>