I was able to fix the problem but now I am with more questions then answers.
Here is what i had before defined in my DSL
[when] The transcation is zero dollar = trans:Transcation (Indicator == "N")
[when] System description one field is ABC= $trans1:Filter(Field1 == "ABC")
[then] Filter out the records = Transcation trans2 = new Transcation();
trans2.setFilterOutRecords( true );insert(trans2)
Now in the business rules i created following rules
Rule 1:
When
The transcation is zero dollar
Then
Filter out the records
Rule2:
When
System description one field is ABC
Then
Filter out the records
Both test cases are passing in guvnor
However when i fire these rules using Java, i was not able to get expected
results.
This is how i fixed it.
For each When defined in DSL i have appropriate Then.
So the question is can we not have a generic Then statement where i can set
a value of the field and then use that with When condition as appropriate.
Your help will be appreciated?
--
View this message in context:
http://drools.46999.n3.nabble.com/How-to-integrate-Declarative-Fact-creat...
Sent from the Drools: User forum mailing list archive at
Nabble.com.