I am having trouble getting the isA operator to work with POJO facts.
The problem manifests in the IsAEvaluator.evaluate(...) method, line
163 (5.3.0.Final). This line checks whether the objectValue class is
annotated with @Traitable. For a @Traitable fact fully declared in
DRL, this line correctly evaluates to true. For a POJO fact which is
declared @Traitable in DRL, this line evaluates to false. (I tried
adding @Traitable to the POJO fact itself, which results in the line
evaluating true, but the next line which casts to a TraitableBean
fails.)
I have attached a test demonstrating the problem. There are two DRL
files, one which declares a fact entirely, and another which adds
@Traitable to a POJO fact. The declared fact and the POJO fact have
identical structure, and the rules are also otherwise identical.
However, the declared test passes, while the POJO test fails.
Is this a bug, or am I doing something horribly wrong? Thanks.
Mike