[rules-users] Test Scenarios variable binding not working for true/false picklist

apatel apatel at ondeckcapital.com
Tue Sep 21 10:59:18 EDT 2010


Hi, 

I have a rule that does a null check, as well as a false check on a fact
variable that sets another variable to 'Declined' when it is false or null. 

I am testing this using a Test Scenario. I have two test scenarios. One that
check when the fact variable is true and the other when it is false, but
none for the null scenario. When I keep the null check the Decline test
works but the Approve fails. Conversely when I remove the null check the
Approve scenario works but the Decline fails. My conclusion is that the test
fact variable value is not getting bound. 

Furthermore the variable that is being set in the test scenario is on a
BankingData fact which is a bind variable on an UnderwritingData fact.
Either the simple variable binding on the BankingData fact is not working or
the fact binding on the UnderwritingData is not working. 

How do I debug this. Also is there some specific procedure to follow to bind
a fact? Does the fact that is being bound have to be created before the fact
it is being bound to? 

Any help is much appreciated. 

Kind regards, 
Amisha 

ps I also wanted to add that I compiled the Packages in Guvnor and used them
in my Java Tests which are the same as the Test Scenarios and that worked. 

-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Test-Scenarios-variable-binding-not-working-for-true-false-picklist-tp1555274p1555274.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list