On 20/03/2013, ajklunder2 <albert.jan.klunder(a)gmail.com> wrote:
Thanks,
Is that the solution? That seems odd to me because IsBadDebtor is an
inferred object and should have the class Debtor.
This is completely unwarranted - why should it be so? Here, its
purpose is to represent a (new) fact in relation to a single given
fact, but there may be other inferred objects based on combinations of
facts.
When you have to declare
a class for every type of inferred object you are using that would be
strange.
Not any stranger than Java which requires you to declare all classes
you are using. The Working Memory contains objects of Java classes.
These classes would extend the class where they are inferred from
and would be totally empty: no own attributes, nor methods.
This is in contrast to the way you are using it, i.e., passing a
reference to another object to the constructor.
BTW: You've missed an important point by using "insert" instead of
"insertLogical". See the "Drools Expert User Guide".
They would only
be declared to solve this compilation issue.
-W