Update the code.Correct the script to work in Pentaho CE and EE.