title: How to set process variables in Script Task in JBPM 7.3
body: <p>I have a business process defined with bpmn2 standard and I want to set up a custom object into a Script Task and pass it to a Human Task. There are three process variables:</p>
  
  <p><a href="https://i.stack.imgur.com/DqnJK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DqnJK.png" alt="Process variables"></a></p>
  
  <p>and here is the piece of process:</p>
  
  <p><a href="https://i.stack.imgur.com/DVM3B.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DVM3B.png" alt="Business Process"></a></p>
  
  <p>Into Set Object there is the following code:</p>
  
  <pre><code>toBeApproved = new com.myteam.pocapproval.ObjectToBeApproved();
  toBeApproved.setCountry(country);
  toBeApproved.setAmount(amount);
  </code></pre>
  
  <p>The problem is that the process variable <code>toBeApproved</code>, after the script task, won't be filled when I start the process passing only <code>country</code> and <code>amount</code> via rest API <code>/server/containers/{id}/processes/{pId}/instances</code>.</p>