multi-restriction pattern throws UnsupportedOpEx
------------------------------------------------
Key: JBRULES-2224
URL:
https://jira.jboss.org/browse/JBRULES-2224
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-compiler (expert)
Affects Versions: 5.0.1.FINAL
Reporter: Wolfgang Laun
Assignee: Edson Tirelli
Fix For: 5.2.0.M1
rule "same"
when
$m : ShGraphType( $x25No : x25No, $trans : trans )
GoType( x25No == $x25No || == ($x25No % 2000), trans != $trans ) #!!!#
$e : ShType( x25No == $x25No )
$v : View( elemSet contains $m )
then
Field x25No is an int.
The marked pattern is not flagged in Eclipse, passes the compiler without an error, but
crashes at runtime during fact insertion with:
Exception in thread "main" java.lang.UnsupportedOperationException: does not
support method call isAllowed(Object object, InternalWorkingMemory workingMemoiry)
at
org.drools.rule.ReturnValueRestriction.isAllowedCachedRight(ReturnValueRestriction.java:252)
at
org.drools.rule.OrCompositeRestriction.isAllowedCachedRight(OrCompositeRestriction.java:51)
at
org.drools.rule.MultiRestrictionFieldConstraint.isAllowedCachedRight(MultiRestrictionFieldConstraint.java:115)
at
org.drools.common.DoubleBetaConstraints.isAllowedCachedRight(DoubleBetaConstraints.java:181)
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:172)
at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:360)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:344)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:184)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:146)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1094)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1045)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:830)
at
org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:219)
at rss.checker.engine.impl.DroolsEngine.insert(DroolsEngine.java:61)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: