[
http://jira.jboss.com/jira/browse/JBRULES-1427?page=all ]
Mark Proctor closed JBRULES-1427.
---------------------------------
Resolution: Rejected
We currently only allow variables and literals to be used in 'in' statements. What
you are asking is the ability to have expressions that get resolved to values. Please open
a new JIRA for this, but as it's complex it's unlikely we'll do this any time
soon, without community supplied patches.
Can't call static method in 'in' compound restriction
-----------------------------------------------------
Key: JBRULES-1427
URL:
http://jira.jboss.com/jira/browse/JBRULES-1427
Project: JBoss Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 4.0.4
Reporter: Alexandre Gattiker
java.lang.UnsupportedOperationException: does not support method call isAllowed(Object
object, InternalWorkingMemory workingMemoiry)
at org.drools.rule.ReturnValueRestriction.isAllowed(ReturnValueRestriction.java:181)
at org.drools.rule.OrCompositeRestriction.isAllowed(OrCompositeRestriction.java:20)
at
org.drools.rule.MultiRestrictionFieldConstraint.isAllowed(MultiRestrictionFieldConstraint.java:70)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:132)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:318)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
at org.drools.reteoo.Rete.assertObject(Rete.java:175)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:909)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:881)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:682)
at com.sample.DroolsTest.main(DroolsTest.java:28)
Steps to reproduce:
- Create a sample rule project in Eclipse
- Add the following rule to Sample.drl:
rule "rule1"
when
$p1:Message(
message in (
(new String("A")),
(new String("B"))
)
)
then
System.out.println("foo");
end
Same when calling a static method instead of a constructor.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira