title: How to pass boolean parameter value in pipeline to downstream jobs?
body: <p>I'm using Jenkins v2.1 with the integrated delivery pipeline feature (<a href="https://jenkins.io/solutions/pipeline/" rel="noreferrer">https://jenkins.io/solutions/pipeline/</a>) to orchestrate two existing builds (build and deploy).</p>
  
  <p>In my parameterized build I have 3 user parameters setup, which also needs to be selectable in the pipeline.</p>
  
  <p>The pipeline script is as follows:</p>
  
  <pre><code>node: {
      stage 'build'
      build job: 'build', parameters: [[$class: 'StringParameterValue', name: 'target', value: target], [$class: 'ListSubversionTagsParameterValue', name: 'release', tag: release], [$class: 'BooleanParameterValue', name: 'update_composer', value: update_composer]]
  
      stage 'deploy'
      build job: 'deploy', parameters: [[$class: 'StringParameterValue', name: 'target', value: target]]
  }
  </code></pre>
  
  <p>This works correctly except for the <code>BooleanParameterValue</code>. When I build the pipeline the following error is thrown:</p>
  
  <pre><code>java.lang.ClassCastException: hudson.model.BooleanParameterValue.value expects boolean but received class java.lang.String
  </code></pre>
  
  <p>How can I resolve this typecasting error?
  Or even better, is there a less cumbersome way in which I can just pass ALL the pipeline parameters to the downstream job.</p>