How to access to parameters in a Jenkins Template?

I have this template: def call(body) { def pipelineParams= [:] body.resolveStrategy = Closure.DELEGATE_FIRST body.delegate = pipelineParams body() pipeline { agent any …. stages { stage(‘My stages’) { steps { script { pipelineParams.stagesParams.each { k, v -> if (k.toLowerCase().startsWith(“If “)) { // sort of when { expression { params[ k.split(‘ ‘)[1] ] as boolean } }…

Details