[jboss-jira] [JBoss JIRA] Created: (JBRULES-1027) unable to use moderately complicated expression in from

Michael Neale (JIRA) jira-events at lists.jboss.org
Wed Jul 25 05:49:51 EDT 2007


unable to use moderately complicated expression in from
-------------------------------------------------------

                 Key: JBRULES-1027
                 URL: http://jira.jboss.com/jira/browse/JBRULES-1027
             Project: JBoss Rules
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Drl Parser/Builder
    Affects Versions:  4.0.0.GA
            Reporter: Michael Neale
         Assigned To: Edson Tirelli
            Priority: Critical


Try the following fairly simple example, and an error will ensue: 

package sample;

import Query;
import Results;
import Storage;

rule "Verify_1"
    when
        content : Storage()
        results : Results( ) from content.search(new Query("test","field"))
    then
        System.out.println( results ); 
end

============================================================================

/**
 * 
 */
public class Query {

    public Query(String pattern, String column) {

    }

}

============================================================================

/**
 * 
 */
public class Results {

    public int getResultsCount() {
        return 1;
    }

}

============================================================================

/**
 * 
 */
public class Storage {

    public Results search(Query query) {
        return new Results();
    }

}

============================================================================

public class HelloWorldExample {

    public static final void main(final String[] args) throws Exception {
        BasicConfigurator.configure();
        Logger.getRootLogger().setLevel(Level.DEBUG);

        DrlParser parser = new DrlParser();
        final Reader source = new FileReader("sample.drl");
        PackageDescr descr = parser.parse(source);
        source.close();
        PackageBuilder builder = new PackageBuilder();
        builder.addPackage(descr);
        Package pkg = builder.getPackage();
        pkg.checkValidity();
    }
}

-- 
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