Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-6358

Adding inner class as Fact to guided Rule generates incorrect BRL source

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Minor Minor
    • LATER
    • 3.1.1
    • drools
    • None
    • Linux 32bit
      JBDS 3.0.1.v201005241821R-H78-GA
      JDK Sun 1.6

      When inner class is used as Fact for guided rule it generates incorrect .brl file with error "BuildError: Unable to resolve ObjectType '<class>$<innerclass>'"

      .brl source looks something like this:
      <rule>
      <name>guided</name>
      <modelVersion>1.0</modelVersion>
      <attributes/>
      <metadataList/>
      <lhs>
      <fact>
      <factType><class>$<innerclass></factType>
      </fact>
      </lhs>
      <rhs/>
      </rule>

      When .brl file is modified and '$" is replaced with '.' i.e "<factType><class>$<innerclass></factType>" is replaced with "<factType><class>.<innerclass></factType>" error is fixed. .brl file is displayed without errors.

      Steps to reproduce:
      1. create new Drools Project
      2. create new guided rule
      3. add "import com.sample.DroolsTest.Message;" line to drools.package file
      4. open new guided rule file add new when condition and select "DroolsTest$Message" as Fact type
      5. save guided rule file and error will appear in Problems view

              Unassigned Unassigned
              vpakan Vlado Pakan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: