rule "process Token"
salience - $prio // by ascending x25No values
when
$token: Token( $x25No: x25No ) // match on int x25No
$elem: ElemType( $prio: x25No == $x25No )
then
retract($token);
end
All versions 5.[2345].0 crash. Using "0 - $prio" is a workaround.
Exception in thread "main" java.lang.NullPointerException
at org.drools.base.mvel.MVELSalienceExpression.getValue(MVELSalienceExpression.java:93)
at org.drools.common.DefaultAgenda.createActivation(DefaultAgenda.java:579)
at org.drools.reteoo.RuleTerminalNode.assertLeftTuple(RuleTerminalNode.java:253)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:71)
at org.drools.reteoo.JoinNode.propagateFromLeft(JoinNode.java:107)
at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:95)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:145)
at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:154)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847)
at
org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269)
at geninq.Main.execute(Main.java:97)
at geninq.Main.main(Main.java:133)