Hi,
I have these two classes:
ExpenseReport{
Collection<ExpenseDetails> expenseDetails
}
ExpenseDetails{
ExpenseReport document
ExpenseType expenseType
}
I am trying to create a rule that fires when all the ExpenseDetails in a
ExpenseReport are of the same type:
rule "Do Not Process TAX"
when
$report: ExpenseReport($expenseDetails: expenseDetails)
forall (
ExpenseDetails(document==$report, expenseType == ExpenseType.TAX)
)
then
System.out.println("################ It works ##################");
insertLogical("Bypass Process");
end
For some reasons, it fires regardless that value of
ExpenseDetails.expenseType.
I just started with drools and any help i more than welcome.
Thanks