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

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
    • 7.9.1.GA
    • 7.8.0.GA
    • BRE, Kie-Server
    • None
    • False
    • False
    • Release Notes
    • CR1
    • +
    • Undefined
    • 2020 Week 46-48 (from Nov 9), 2020 Week 49-51 (from Nov 30)

      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
            Daniel Rosa Daniel Rosa
            Daniel Rosa Daniel Rosa
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: