Scala - how to use variables in a multi-line string literal
<p>I want to call value of '<strong>myActionID</strong>' variable. How do I do that?
If i pass static value like &quot;actionId&quot;:1368201 to myActionID then it works, but If I use &quot;actionId&quot; : ${actionIdd} it gives error.</p>
<p>Here's the relevant code:</p>
<pre><code>class LaunchWorkflow_Act extends Simulation {

    val scenarioRepeatCount = 1
    val userCount = 1
    val myActionID = &quot;13682002351&quot;
    
    val scn = scenario(&quot;LaunchMyFile&quot;)
        .repeat (scenarioRepeatCount) {
            exec(session =&gt; session.set(&quot;counter&quot;, (globalVar.getAndIncrement+&quot; &quot;+timeStamp.toString())))
            .exec(http(&quot;LaunchRequest&quot;)
            .post(&quot;&quot;&quot;/api/test&quot;&quot;&quot;)
            .headers(headers_0)
            .body(StringBody(
                &quot;&quot;&quot;{    &quot;actionId&quot;: ${myActionID} ,
                &quot;jConfig&quot;: &quot;{\&quot;wflow\&quot;:[{\&quot;Wflow\&quot;:{\&quot;id\&quot;: \&quot;13500145349\&quot;},\&quot;inherit-variables\&quot;: true,\&quot;workflow-context-variable\&quot;: [{\&quot;variable-name\&quot;: \&quot;externalFilePath\&quot;,\&quot;variable-value\&quot;: \&quot;/var/nem/nem/media/mount/assets/Test.mp4\&quot;},{\&quot;variable-name\&quot;: \&quot;Name\&quot;,\&quot;variable-value\&quot;: \&quot;${counter}\&quot;}]}]}&quot;
                }&quot;&quot;&quot;)))

            .pause(pause) 

        }
    }

setUp(scn.inject(atOnceUsers(userCount))).protocols(httpProtocol)
</code></pre>
<p>Everything works fine If I put value 13682002351 instead of myActionID. While executing this script in Gatling I am Getting this error</p>
<blockquote>
<p>ERROR i.g.http.action.HttpRequestAction - 'httpRequest-3' failed to
execute: No attribute named 'myActionID' is defined</p>
</blockquote>