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

DecisionTable incorrectly parsed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.2.0.CR1
    • None
    • None
    • None

      5.2.0.CR1 creates incorrect drl from decision table. With 5.1.0.M1 the drl for the same decision table is correct.

      Wrong DRL from 5.2.0.CR1:
      rule "ProcessState"
      salience 65522
      ruleflow-group "CompleteSubOrder"
      activation-group "ProcessState"
      when
      $m:ModifiedMarker(processState==null, state ==null)
      $s:SubOrder
      then
      $m.setIsModified(true);
      $s.setProcessState(ProcessState.CREATED);

      end

      Correct DRL with 5.1.0.M1:
      rule "ProcessState"
      salience 65522
      ruleflow-group "CompleteSubOrder"
      activation-group "ProcessState"
      when
      $m:ModifiedMarker()
      $s:SubOrder(processState==null, state ==null)
      then
      $m.setIsModified(true);
      $s.setProcessState(ProcessState.CREATED);

      end

      The difference is that the constraints are put to $m instead of putting them to $s.

      The behaviour in 5.2.0.CR1 is the same for all decision tables in my project and prevents me from upgrading to newer drools versions.

              mfusco@redhat.com Mario Fusco
              mfusco@redhat.com Mario Fusco
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: