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

IPatel ishita.patel at usbank.com
Thu Feb 28 16:39:10 EST 2013


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-created-using-Guvnor-in-Java-tp4022625p4022643.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list