[rules-users] 'from' returns previous instance in stateful session

ismaximum mnrz57 at gmail.com
Mon Mar 4 20:17:51 EST 2013


Hi

In our rule we have a code like this:

	when
		$r : ReferenceCode(value == "N") from
referenceCodeService.getReferenceCode("SPLIT_YN")
	then
		System.out.println("----> " + $r.getValue() + " - " +
referenceCodeService.getReferenceCode("IDD_YN").getValue());


Now the problem is when we fire all rules to activate this one, the print
out is like this:

N - N
N - Y

As you see the first time it's N which is correct but second time I expect
to be Y

The ReferenceCodeService is a mock service in which we defined a Map that
contains all ref codes. Now before first firing rules I set the value of
SPLIT_YN to N and then for second I set it to Y but it seems it's still
returning the previous value.

Any idea?

Thanks

Drools 5.5



--
View this message in context: http://drools.46999.n3.nabble.com/from-returns-previous-instance-in-stateful-session-tp4022681.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list