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

NamedConsequence multiple if after eval with exec-model

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.56.0.Final
    • 7.55.0.Final
    • executable model
    • None
    • 2021 Week 22-24 (from May 31)
    • 2
    • Undefined
    • NEW
    • NEW

      rule R1 when
          $a: Cheese ( )
          eval( $a.getType().equals("stilton") )
          if ( $a.getPrice() > 10 ) do[t1]
          if ( $a.getPrice() < 10 ) do[t2]
          $b: Cheese ( type == "cheddar" )
      then
          results.add( $b.getType() );
      then[t1]
          results.add( $a.getType().toUpperCase() );
      then[t2]
          results.add( $a.getType() );
      end
      

      results in

      17:36:30.958 [main] ERROR o.d.testcoverage.common.util.KieUtil.getKieBuilderFromKieFileSystem:157 - KieBuilder errors: [Message [id=1, kieBase=KieBaseModelName, level=ERROR, path=rules1.drl, line=-1, column=0
         text=Related pattern cannot be found for if ( $a.getPrice() > 10 ) do[t1]], Message [id=2, kieBase=KieBaseModelName, level=ERROR, path=rules1.drl, line=-1, column=0
         text=Related pattern cannot be found for if ( $a.getPrice() < 10 ) do[t2]]]
      

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: