Looks like a bug. Can you please open a JIRA for this?

   Thanks
      Edson

2007/8/23, Dean Jones <dean.m.jones@gmail.com >:
Hello again,

I'm probably missing something fundamental here, but I have the
following rulebase:

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

and the following code:

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));
}

}

Neither of the rules fire, which is not what I expected - I thought
that the "Goodbye world" rule would fire. When I switch to using a
StatefulSession, the rules behave as I expect. Any thoughts on what's
going on here? Thanks,

Dean.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com