[rules-users] How to integrate Declarative Fact created using Guvnor in Java

IPatel ishita.patel at usbank.com
Thu Feb 28 11:40:24 EST 2013


Thank you for your response.

I was able to follow your instruction and  created newInstance of the facts.

Quick question: I have 2 facts defined in Guvnor:
Conditions
Variable: Source (this variable is text/string)
Variable: SourceType (this variable is text/string)

Transcation
Variable: filter (this variable is boolean)

I have 2 rules as follows:
If source =ABC then filter = true

if source =ABC then hasIntegrated = true

In my main method
I created and inserted new instance of each Source as well as Transcation
I set the variables of the source instance so that i can fire above rules.
Source = ABC

Rule 1 fires fine. I get the expected result

However for Rule 2 the value of hasIntegrated is false instead of true. I
run the test in Guvnor and it passes. However in my main method it
fails/give me unexpected result.

Any idea why this is happening???



--
View this message in context: http://drools.46999.n3.nabble.com/How-to-integrate-Declarative-Fact-created-using-Guvnor-in-Java-tp4022625p4022637.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list