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

Unable to cast to subtype in OOPath expression

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None
    • None
    • 2021 Week 28-30 (from Jul 12)
    • Undefined
    • NEW
    • NEW

      I'm probably doing something wrong here, but was asked to create this Jira with a reproducer by mfusco@redhat.com here. I've attached a reproducer.

       

      Description of the issue. I have a top level `Product` with several subtypes. Depending on the rule that is hit, the subtype will be something like `CashProduct` or `LoanProduct`. I then need to access a field that exists only on that type. It appears that I'm doing something incorrect, as I'm getting the error

       

      java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
       [error]: Build step org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor#generateModel threw an exception: org.kie.kogito.codegen.rules.RuleCodegenError: Errors were generated during the code-generation process:
       No value present
      

       

       

      which doesn't really tell me much. Any help would be appreciated.

       

      To reproduce, just start the attached project `mvn clean quarkus:dev`. You can also try running the LocalOutsideInTests{{}}

              mfusco@redhat.com Mario Fusco
              snowe Tyler Thrailkill (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: