title: Jmeter - Calling javascript using JSR223 Post processor
body: <p>I capture 6 elements using a regular expression. say</p>
  <pre><code>Variable : UserDetails
  Regular Expression : loadHeadWorkFlow\('(.+?)','(.+?)','(.+?)','(.+?)','(.+?)','(.+?)','/I
  Template : $1$$2$$3$$4$$5$$6$
  </code></pre>
  <p>Now I could access these values via UserDetails_g1, UserDetails_g2.....UserDetails_g6</p>
  <p>Next, these 6 values need to be encrypted using a javascript file. The file contains the logic.</p>
  <p>How should my code be using JSR223 post processor?</p>
  <p>The steps that I followed:</p>
  <p>1.</p>
  <pre><code>load('Encryption.js');
  
     var result = encrypt(&quot;${UserDetails_g1}&quot;,&quot;password&quot;);
     log.info(&quot;encrypted value is &quot;+result);
     vars.put(&quot;LoginDataString&quot;,result);
  
     var result1 = encrypt(&quot;${UserDetails_g2}&quot;,&quot;password1&quot;);
     vars.put(&quot;UserId&quot;,result1);
  
     var result2 = encrypt(&quot;${UserDetails_g3}&quot;,&quot;password2&quot;);
     vars.put(&quot;RoleId&quot;,result2);
  </code></pre>
  <p>First value is encrypted correctly. But the other values aren't correct. If I add individual post processors for every variable. All the encrypted values show correctly.</p>
  <p>Is there a way where I could use a single post processor to perform all the 6 encryptions. Thanks in advance</p>
  <p>Regards,
  Ajith</p>