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

Parser and Canonical Model Compiler error on Conditional Named Consequence

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.28.0.Final
    • Fix Version/s: None
    • Component/s: core engine
    • Labels:
      None

      Description

      See reproducer here: https://github.com/DuncanDoyle/drools-conditional-named-consequence-issue

      When you use a Conditional Named Consequence

      if

      definition directly after an

      accumulate

      , Drools gives the following error when parsing the DRL:

      [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.28.0.Final:build (default-build) on project drools-conditional-named-consequence-issue: Execution default-build of goal org.kie:kie-maven-plugin:7.28.0.Final:build failed: Unable to get KieModule, Errors Existed: Error Messages:
      [ERROR] Message [id=1, kieBase=defaultKieBase, level=ERROR, path=rules.drl, line=19, column=0
      [ERROR]    text=Unable to resolve ObjectType 'if']
      [ERROR] ---
      [ERROR] Warning Messages:
      [ERROR] ---
      [ERROR] Info Messages:
      [ERROR]
      

      When you add a constraint between the

      accumulate

      and the

      if

      statement of the Conditional Named Consequence, it works fine.

      Also when you try to generate the canonical model from a DRL that contains a Conditional Named Consequence, you get the following error:

      [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.28.0.Final:generateModel (default-generateModel) on project drools-conditional-named-consequence-issue: A type incompatibility occurred while executing org.kie:kie-maven-plugin:7.28.0.Final:generateModel: org.drools.compiler.lang.descr.NamedConsequenceDescr cannot be cast to org.drools.compiler.lang.descr.PatternDescr
      
      
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                volothamp Luca Molteni
                Reporter:
                McCloud Duncan Doyle
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: