Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-1945

unexpected rule fires after upgrading from 7.10.1 to 7.12.1 when capitalized property is updated in modify block

    XMLWordPrintable

Details

    • False
    • None
    • False
    • Release Notes
    • CR1
    • +
    • Hide

      run script 'run_mvn' within attached project.

      ##### insert fact: TestInterface [caseNo=Case1, rulesList=[]]
      ***** start
      ▼▼▼ Rule [Create_input_data] fires!!!
          insert temp :TempObject [caseNo=Case1, targetObjList=[TargetObject [caseNo=Case1, id = 1, objList=[]]]]
          insert target :TargetObject [caseNo=Case1, id = 1, objList=[]]
      ▼▼▼ Rule [Expected_Results] fires!!!
      ▼▼▼ Rule [Target_Rule] fires!!!
      ▼▼▼ Rule [Expected_Results] fires!!!
      ***** end
      ##### result number of rules executed: 4
      

      Rule Expected_Results is executed twice and rulles fire 4 times in total (which should be 3.

      If executable model is used (i.e. -DgenerateModel=YES), Rule Expected_Results will be executed only once.

      When activate the following line in run_mvn to run it with 7.10.1, rules fires only 3 times.

      BA_VERSIONS="-Dba.bom.version=7.10.1.redhat-00001 -Dba.library.version=7.48.0.Final-redhat-00006"
      
      Show
      run script 'run_mvn' within attached project. ##### insert fact: TestInterface [caseNo=Case1, rulesList=[]] ***** start ▼▼▼ Rule [Create_input_data] fires!!! insert temp :TempObject [caseNo=Case1, targetObjList=[TargetObject [caseNo=Case1, id = 1, objList=[]]]] insert target :TargetObject [caseNo=Case1, id = 1, objList=[]] ▼▼▼ Rule [Expected_Results] fires!!! ▼▼▼ Rule [Target_Rule] fires!!! ▼▼▼ Rule [Expected_Results] fires!!! ***** end ##### result number of rules executed: 4 Rule Expected_Results is executed twice and rulles fire 4 times in total (which should be 3. If executable model is used (i.e. -DgenerateModel=YES), Rule Expected_Results will be executed only once. When activate the following line in run_mvn to run it with 7.10.1, rules fires only 3 times. BA_VERSIONS= "-Dba.bom.version=7.10.1.redhat-00001 -Dba.library.version=7.48.0.Final-redhat-00006"
    • 2022 Week 44-46 (from Oct 31)

    Description

      After upgrading RHDM from 7.10.1 to 7.12.1, when using non-executable model, if the capitalized property is updated in modify block of RHS, it behaves as class reactive and then unexpected rules gets executed.

      Here are example rule which caused the issue.

      rule "Target_Rule"
              when 
                      $temp : TempObject(id == "1", $id : id, $MyList : MyList)
      		$target : TargetObject(id == $id) 
              then
      		delete($target);
      
      		$MyList.remove($target);
      		modify($temp){
      			MyList = $MyList;
      		}
      
      		System.out.println("▼▼▼ Rule [Target_Rule] fires!!!");
      end
      
      

      This is caused by RHDM-1639 which is fixed in 7.11.0.
      In addition, this does not happen when using executable-model.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-hmiura Hiroko Miura
              Daniel Rosa Daniel Rosa
              Daniel Rosa Daniel Rosa
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: