Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-1027

unable to use moderately complicated expression in from

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 4.0.0.GA
    • Fix Version/s: 4.0.1
    • Component/s: drools-compiler
    • Labels:
      None

      Description

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

      }

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tirelli Edson Tirelli
                Reporter:
                michaelneale Michael Neale
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: