This is an obscure feature of Java closures (and what you collect in the map _is_ a closure) but it can be easily curcumvented:
```
stagesToBuild.each { s ->
parallelStagesSoak[s] = {
def this_user = WINUSER
echo "WINUSER in test=" + this_user
node(label: "soak-client && windows") {
stage(s) {
bat "net use $params.MAP_DRIVE_WIN: $params.PATH_WIN /user:domain1\\${this_user} test"
}
}
}
}
According to other answers I am adding the parallel stages scenario:
```
pipeline {
agent any
stages {
stage('some parallel stage') {
parallel {
stage('parallel stage 1') {
when {
expression { ENV == "something" }
}
steps {
echo 'something'
}
}
stage('parallel stage 2') {
steps {
echo 'something'
}
}
}
}
}
}
```