Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-4579

drools keyword in RHS does no longer provide access to Match

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • executable model
    • None

      In previous versions of Drools, the drools keyword gave access to the KnowledgeHelper instance, which allowed you to, for example, access the Match of a rule in the RHS.

      In Kogito, the drools keyword gives access to org.drools.model.Drools, which does not provide a getMatch() method, and hence, the Match object is no longer accessible.

      Compilation fails with the following exception:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile-1) on project kogito-drools-keyword-rhs-reproducer: Compilation failure
      [ERROR] /Users/ddoyle/Development/github/kogito-drools-keyword-rhs-reproducer/target/generated-sources/kogito/A/RulesF7B5F428120C17D6910155537EA75A75RuleMethods0.java:[35,74] cannot find symbol
      [ERROR]   symbol:   method getMatch()
      [ERROR]   location: variable drools of type org.drools.model.Drools
      

      Reproducer here: https://github.com/DuncanDoyle/kogito-drools-keyword-rhs-reproducer

            mfusco@redhat.com Mario Fusco
            rhn-gps-ddoyle Duncan Doyle (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: