(I'll try and create a simpler demo, but here's the original.)
when
Token( $elem: element ) // element is a MaSigType application object
AnyTrainSignal( x25no == $elem ) // x25 is an int
then
It's obvious that this is a user error (correct would be this ==
$elem). It results in the stack dump given below.
But the question is: does the diagnostic have to be the way it is? The
rule where the insert is doesn't help, and neither does the actual
class of the object. Normally, I'd expect that a compiler detects such
an error, as the Java compiler does.
-W
Caused by: org.drools.RuntimeDroolsException: Conversion to long not
supported from rss.bfz.cfg.jaxb.elrep.MaSigType
at
org.drools.base.extractors.BaseObjectClassFieldReader.getLongValue(BaseObjectClassFieldReader.java:156)
at org.drools.base.ClassFieldReader.getLongValue(ClassFieldReader.java:167)
at
org.drools.rule.VariableRestriction$LongVariableContextEntry.updateFromTuple(VariableRestriction.java:455)
at
org.drools.common.SingleBetaConstraints.updateFromTuple(SingleBetaConstraints.java:108)
at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:91)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:197)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:146)
at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:158)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:215)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:244)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:330)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:291)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:886)
at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:180)
at org.drools.base.DefaultKnowledgeHelper.insert(DefaultKnowledgeHelper.java:174)
at
rss.ixl.route.Rule_ERS__start_collecting_elements_on_regular_route.defaultConsequence(Rule_ERS__start_collecting_elements_on_regular_route.java:12)
at
rss.ixl.route.Rule_ERS__start_collecting_elements_on_regular_routeDefaultConsequenceInvoker.evaluate(Unknown
Source)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1091)
Show replies by date