I've been working on drools DSL for my particular project and have
overcome all of the classpath, naming convention issues, etc. that can
come up when using a DSL. The problem I am having is in getting my
consequences to fire. Here is a sample of how my rules look:
<rule name="some rule name" salience="50">
<myNamespace:condition nodeName="node">
<myNamespace:aCondition anAttribute="some value"/>
<myNamespace:anotherCondition anotherAttribute="some other
value">
<myNamespace:subelement key="a key" value="a value"/>
</myNamespace:anotherCondition>
</myNamespace:condition>
<myNamespace:consequence nodeName="node">
<myNamespace:myConsequence anAttribute="a value">
<myNamespace:subelement key="a key" value="a value"/>
</myNamespace:myConsequence>
</myNamespace:consequence>
</rule>
When I assert objects, my conditions are firing as expected and without
exception. However, I'm not seeing any conditions fire, even when all
of the conditions are true. I.e., isAllowed() is returning true for
conditions "aCondition" and "anotherCondition", but the invoke() method
of "myConsequence" is not being called. Even when I set my isAllowed()
methods to always return true, my invoke() methods are never reached.
Xerces has no problem validating my XML against my schema, so I'm at a
loss as to what would be causing this.
Maybe the solution is right under my nose...any ideas?
Thanks,
Jeff