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

Executable model compiler casting int to short causes compilation error when variable is inside the bracket

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 7.44.0.Final
    • None
    • 2020 Week 43-45 (from Okt 19)
    • Undefined
    • NEW
    • NEW
    • ---
    • ---

      Compiling using executable model compiler casting int to short causes compilation error when variable is inside the bracket while it works in 6.x and 7.X legacy compile.

      rule "test_rule"
      	dialect "java"
      	when
      		$integerToShort : IntegerToShort( $testInt : testInt		, testBoolean!=null, testBoolean==false) 
      then
      	System.out.println("rule_a fired ");
      	$integerToShort.setTestShort((short)($testInt)); 
      	$integerToShort.setTestBoolean(true);
      	update($integerToShort);
      end
      
       public static class IntegerToShort {
      
              private Boolean testBoolean;
              private int testInt;
              private Short testShort;
      }
      

              lmolteni@redhat.com Luca Molteni
              rhn-support-abhumbe Abhijit Humbe
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: