title: Jenkins Active Choice parameter call function with Groovy script
body: <p>Trying to call a defined function in active choice parameter 'script' part seems doesn't work:</p>
  
  <pre><code>def JustTest() {
    xxx = ['a','b']
    return xxx
  }
  
  properties([
      parameters([
          [$class: 'ChoiceParameter', 
              choiceType: 'PT_SINGLE_SELECT', 
              ////
              some code omitted
              ////
              script: [
                  classpath: [], sandbox: false, 
                  script:
                  """
                  def mymy = JustTest()
                  return mymy
                  """
                  ]
              ]
          ]
      ])
  ])
  
  pipeline {
    some code
  }
  </code></pre>
  
  <p>when trying to build with parameters an error is received</p>
  
  <p>p.s. 'input' doesn't fit for me, I need to choose parameters before starting</p>