[jboss-jira] [JBoss JIRA] Closed: (JBRULES-1116) "not" doesn't work for StatelessSessions
Mark Proctor (JIRA)
jira-events at lists.jboss.org
Fri Aug 24 07:49:18 EDT 2007
[ http://jira.jboss.com/jira/browse/JBRULES-1116?page=all ]
Mark Proctor closed JBRULES-1116.
---------------------------------
Resolution: Done
> "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)
> Components: Reteoo, Drl Parser/Builder
> Affects Versions: 4.0.0.GA
> Reporter: Dean Jones
> Assigned To: Edson Tirelli
> Priority: Blocker
> Fix For: 4.0.1
>
>
> 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