[jboss-jira] [JBoss JIRA] Created: (JBRULES-1116) "not" doesn't work for StatelessSessions
Dean Jones (JIRA)
jira-events at lists.jboss.org
Thu Aug 23 09:54:18 EDT 2007
"not" doesn't work for StatelessSessions
----------------------------------------
Key: JBRULES-1116
URL: http://jira.jboss.com/jira/browse/JBRULES-1116
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.0.0.GA
Reporter: Dean Jones
Assigned To: Mark Proctor
Priority: Blocker
When using a StatelessSession, the "not" quantifier doesn't work. Test case below.
package org.drools.examples
rule "Hello World"
when
Integer()
then
System.out.println("Hello world");
end
rule "Goodbye World"
when
not Integer()
then
System.out.println("Goodbye cruel world");
end
public class TestReadRuleFile {
public static void main(String[] args) throws Exception {
PackageBuilder builder = new PackageBuilder();
InputStreamReader is = new InputStreamReader(
TestReadRuleFile.class.getResourceAsStream("test.drl"));
builder.addPackageFromDrl(is);
Package pkg = builder.getPackage();
RuleBase jbossRulebase = RuleBaseFactory.newRuleBase();
jbossRulebase.addPackage(pkg);
StatelessSession session = jbossRulebase.newStatelessSession();
session.execute(new Float(1));
}
}
The "Goodbye world" rule should fire (there are no Integers in the working memory) but doesn't. If you switch to a StatefulSession, the "Goodbye world" rule does fire.
--
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
More information about the jboss-jira
mailing list